diff --git a/deployments/blast/Automate_Implementation.json b/deployments/blast/Automate_Implementation.json index 3f04d00..8953c03 100644 --- a/deployments/blast/Automate_Implementation.json +++ b/deployments/blast/Automate_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x6184eA5303D08d8916F12f2973BFCfaf98665084", + "address": "0x275326286986e946d9b2E1ACbc87B74c07d34240", "abi": [ { "inputs": [ @@ -61,6 +61,19 @@ "name": "LogUseGelato1Balance", "type": "event" }, + { + "inputs": [], + "name": "BLAST", + "outputs": [ + { + "internalType": "contract IBlast", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -74,6 +87,39 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "claimAllGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "claimMaxGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "configureClaimableGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -607,28 +653,30 @@ "type": "function" } ], - "transactionHash": "0x33f2a6cfe2099b97a6bc6584a54a69de7695586b07dd2c2ea5642a4b058df67e", + "transactionHash": "0xcaba0461d59052d5778280afda71d99bd480818e121803f919a4918e5f598fe7", "receipt": { "to": null, "from": "0xF1108379d71ff2A785899F4C36010f841F1Fea04", - "contractAddress": "0x6184eA5303D08d8916F12f2973BFCfaf98665084", - "transactionIndex": 15, - "gasUsed": "4090889", + "contractAddress": "0x275326286986e946d9b2E1ACbc87B74c07d34240", + "transactionIndex": 27, + "gasUsed": "4331468", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1f581c91c5fb12109d1426dd4fec3889a0e3949aa423cfd650b2682503ebbadc", - "transactionHash": "0x33f2a6cfe2099b97a6bc6584a54a69de7695586b07dd2c2ea5642a4b058df67e", + "blockHash": "0x9c29002f4f029ddf1f1e1221518082efd8d16e03314fb065705cd9e25ae160a8", + "transactionHash": "0xcaba0461d59052d5778280afda71d99bd480818e121803f919a4918e5f598fe7", "logs": [], - "blockNumber": 1362278, - "cumulativeGasUsed": "7266877", + "blockNumber": 4946993, + "cumulativeGasUsed": "9447126", "status": 1, "byzantium": true }, - "args": ["0xFec1E33eBe899906Ff63546868A26E1028700b0e"], - "numDeployments": 2, - "solcInputHash": "cbdbea7c3520531d2f6235911ca6ac38", - "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.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 IERC20 {\\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(\\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(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xbbc8ac883ac3c0078ce5ad3e288fbb3ffcc8a30c3a98c0fda0114d64fc44fca2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.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 function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\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 if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 *\\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\\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 * ```\\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 */\\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 return _values(set._inner);\\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 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 on 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 assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9772845c886f87a3aab315f8d6b68aa599027c20f441b131cd4afaf65b588900\",\"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": "0x60a06040523480156200001157600080fd5b5060405162004a7938038062004a798339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b60805161493162000148600039600081816104710152818161072e015281816107ab01528181610a890152610e3701526149316000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a90565b6103e6565b60405161014d9190612b85565b60405180910390f35b610170600480360381019061016b9190612bd3565b61043c565b60405161017d9190612c0f565b60405180910390f35b6101a0600480360381019061019b9190612dde565b61046f565b005b6101bc60048036038101906101b79190613168565b61065c565b6040516101c9919061320e565b60405180910390f35b6101ec60048036038101906101e791906132a8565b610676565b6040516101f9919061320e565b60405180910390f35b61020a6106f3565b60405161021791906133d4565b60405180910390f35b61022861072c565b6040516102359190613417565b60405180910390f35b610246610750565b6040516102539190612c0f565b60405180910390f35b61027660048036038101906102719190612bd3565b610776565b6040516102839190612c0f565b60405180910390f35b6102a660048036038101906102a19190613432565b6107a9565b005b6102c260048036038101906102bd919061359c565b610920565b005b6102de60048036038101906102d9919061363c565b610a87565b005b6102fa60048036038101906102f59190612bd3565b610d57565b6040516103079190613712565b60405180910390f35b610318610d6f565b60405161032692919061372d565b60405180910390f35b61034960048036038101906103449190612bd3565b610da0565b604051610357929190613781565b60405180910390f35b61037a600480360381019061037591906137aa565b610dfc565b6040516103879190612c0f565b60405180910390f35b610398610e2f565b6040516103a59190613712565b60405180910390f35b6103c860048036038101906103c391906137d7565b610e35565b005b6103e460048036038101906103df9190612bd3565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f4906138fd565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613969565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a878787600261110a565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d878787846040516106499493929190613998565b60405180910390a1505050505050505050565b600061066b8686868686611211565b905095945050505050565b6000806106853388600661124d565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139dd565b87611423565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e906138fd565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613969565b60405180910390fd5b60006108d9868989878787600261110a565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139f0565b60405180910390a15050505050505050565b6109286115a1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a73565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a93565b5b90506020020160208101906109d09190612a90565b600660008888858181106109e7576109e6613a93565b5b90506020020160208101906109fc91906137aa565b6005811115610a0e57610a0d613ac2565b5b6005811115610a2057610a1f613ac2565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b20565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c906138fd565b60405180910390fd5b6000610b368787610b25886115ca565b87610b2f906139dd565b6000611211565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613969565b60405180910390fd5b6000610c2982898989898060000190610be19190613b77565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611743565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c2f565b60405180910390a4836020016020810190610caa9190612a90565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a90565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c6d565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba906138fd565b60405180910390fd5b6000610ee38888610ed3896115ca565b88610edd906139dd565b87611211565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613969565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b77565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611743565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c2f565b60405180910390a4505050505050505050565b60006110ce823360066117eb565b90506110da81836119a8565b5050565b60606110ec82600001611ac7565b9050919050565b60006111028360000183611b23565b905092915050565b6000611170868689604051602001611123929190613d36565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b46565b50809150508215611206576111cb888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611be090919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0988886040516111fd929190613d5e565b60405180910390a15b979650505050505050565b6000858585858560405160200161122c959493929190613fdd565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561126757611266613ac2565b5b6112719190614037565b905060005b8181101561141357600081600581111561129357611292613ac2565b5b90506112b08160058111156112ab576112aa613ac2565b5b611bf7565b6112ba5750611400565b60008660008360058111156112d2576112d1613ac2565b5b60058111156112e4576112e3613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061131e81611c38565b60006376474e6a60e01b8a8a60405160240161133b92919061408d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113dc83836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611caa565b915050808060200190518101906113f391906140e2565b809b50819c505050505050505b808061140b90613b20565b915050611276565b5085859250925050935093915050565b600061143a8686611433876115ca565b8686611211565b905061148d81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b156114cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c490614194565b60405180910390fd5b6114dc81878787876006611d34565b61152d81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f0590919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d878787604051611590939291906141b4565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115e2576115e1613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061164657611645613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116aa576116a9613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061170c5761170b613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b6000806117508584611f1c565b9050611760898989898986612059565b80975081985050506117cc87878a60405160200161177f929190613d36565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b46565b50809250506117df8989898989866121cc565b50979650505050505050565b60008060058081111561180157611800613ac2565b5b905060005b81811161199c57600081600581111561182257611821613ac2565b5b905061183f81600581111561183a57611839613ac2565b5b612312565b6118495750611989565b600085600083600581111561186157611860613ac2565b5b600581111561187357611872613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118ad81611c38565b60006314ae992660e01b89896040516024016118ca929190613d5e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061196b83836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611caa565b9150508080602001905181019061198291906141f9565b9850505050505b808061199490613b20565b915050611806565b50839150509392505050565b6119f981600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b611a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2f90614298565b60405180910390fd5b611a8981600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611be090919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611abb929190613d5e565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b1757602002820191906000526020600020905b815481526020019060010190808311611b03575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7091906142b8565b60006040518083038185875af1925050503d8060008114611bad576040519150601f19603f3d011682016040523d82523d6000602084013e611bb2565b606091505b50809250819350505081158015611bc65750835b15611bd657611bd58184612353565b5b9550959350505050565b6000611bef83600001836124ba565b905092915050565b600060026005811115611c0d57611c0c613ac2565b5b826005811115611c2057611c1f613ac2565b5b03611c2e5760019050611c33565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9e90614341565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cd391906142b8565b600060405180830381855af49150503d8060008114611d0e576040519150601f19603f3d011682016040523d82523d6000602084013e611d13565b606091505b50809250819350505081611d2c57611d2b8184612353565b5b935093915050565b60008260000151519050611d4b83600001516125ce565b60005b81811015611efb57600084600001518281518110611d6f57611d6e613a93565b5b60200260200101519050611d94816005811115611d8f57611d8e613ac2565b5b6128eb565b611d9e5750611ee8565b6000846000836005811115611db657611db5613ac2565b5b6005811115611dc857611dc7613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0281611c38565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e2757611e26613a93565b5b6020026020010151604051602401611e43959493929190614361565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611ee282826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611caa565b50505050505b8080611ef390613b20565b915050611d4e565b5050505050505050565b6000611f14836000018361292c565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4057611f3f612c7b565b5b604051908082528060200260200182016040528015611f6e5781602001602082028036833780820191505090505b50905060005b8281101561204d57846000878381518110611f9257611f91613a93565b5b60200260200101516005811115611fac57611fab613ac2565b5b6005811115611fbe57611fbd613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200057611fff613a93565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061204590613b20565b915050611f74565b50809250505092915050565b6000606060008451905060005b818110156121b9576120a386828151811061208457612083613a93565b5b6020026020010151600581111561209e5761209d613ac2565b5b61299c565b156121a657600063c10304f760e01b8b8b8b8b6040516024016120c994939291906143c2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006121848784815181106121405761213f613a93565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611caa565b9150508080602001905181019061219b919061447e565b809a50819b50505050505b80806121b190613b20565b915050612066565b5086869250925050965096945050505050565b60008151905060005b81811015612308576122128482815181106121f3576121f2613a93565b5b6020026020010151600581111561220d5761220c613ac2565b5b6129dd565b156122f557600063b2db0b4160e01b8989898960405160240161223894939291906143c2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122f18483815181106122ad576122ac613a93565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611caa565b5050505b808061230090613b20565b9150506121d5565b5050505050505050565b60006002600581111561232857612327613ac2565b5b82600581111561233b5761233a613ac2565b5b03612349576001905061234e565b600090505b919050565b6004602083516123639190614509565b0361245e576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036124025760448301925081836040516020016123b7929190614576565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f991906133d4565b60405180910390fd5b8160405160200161241391906145e6565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245591906133d4565b60405180910390fd5b8060405160200161246f9190614654565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124b191906133d4565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125c25760006001826124ec9190614676565b90506000600186600001805490506125049190614676565b905081811461257357600086600001828154811061252557612524613a93565b5b906000526020600020015490508087600001848154811061254957612548613a93565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612587576125866146aa565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125c8565b60009150505b92915050565b600081519050600060016005808111156125eb576125ea613ac2565b5b6125f59190614037565b905060008167ffffffffffffffff81111561261357612612612c7b565b5b6040519080825280602002602001820160405280156126415781602001602082028036833780820191505090505b50905060005b838110156127655760008111156126ff57846001826126669190614676565b8151811061267757612676613a93565b5b6020026020010151600581111561269157612690613ac2565b5b8582815181106126a4576126a3613a93565b5b602002602001015160058111156126be576126bd613ac2565b5b116126fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f590614725565b60405180910390fd5b5b60018286838151811061271557612714613a93565b5b6020026020010151600581111561272f5761272e613ac2565b5b815181106127405761273f613a93565b5b602002602001019015159081151581525050808061275d90613b20565b915050612647565b50806001600581111561277b5761277a613ac2565b5b8151811061278c5761278b613a93565b5b6020026020010151156127d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127cb906147b7565b60405180910390fd5b80600060058111156127e9576127e8613ac2565b5b815181106127fa576127f9613a93565b5b602002602001015180156128385750806004600581111561281e5761281d613ac2565b5b8151811061282f5761282e613a93565b5b60200260200101515b15612878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286f90614849565b60405180910390fd5b806002600581111561288d5761288c613ac2565b5b8151811061289e5761289d613a93565b5b60200260200101516128e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128dc906148db565b60405180910390fd5b50505050565b60006002600581111561290157612900613ac2565b5b82600581111561291457612913613ac2565b5b036129225760019050612927565b600090505b919050565b60006129388383611b23565b612991578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612996565b600090505b92915050565b6000600260058111156129b2576129b1613ac2565b5b8260058111156129c5576129c4613ac2565b5b036129d357600190506129d8565b600090505b919050565b6000600360058111156129f3576129f2613ac2565b5b826005811115612a0657612a05613ac2565b5b03612a145760019050612a19565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a5d82612a32565b9050919050565b612a6d81612a52565b8114612a7857600080fd5b50565b600081359050612a8a81612a64565b92915050565b600060208284031215612aa657612aa5612a28565b5b6000612ab484828501612a7b565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612afc81612ae9565b82525050565b6000612b0e8383612af3565b60208301905092915050565b6000602082019050919050565b6000612b3282612abd565b612b3c8185612ac8565b9350612b4783612ad9565b8060005b83811015612b78578151612b5f8882612b02565b9750612b6a83612b1a565b925050600181019050612b4b565b5085935050505092915050565b60006020820190508181036000830152612b9f8184612b27565b905092915050565b612bb081612ae9565b8114612bbb57600080fd5b50565b600081359050612bcd81612ba7565b92915050565b600060208284031215612be957612be8612a28565b5b6000612bf784828501612bbe565b91505092915050565b612c0981612a52565b82525050565b6000602082019050612c246000830184612c00565b92915050565b6000819050919050565b612c3d81612c2a565b8114612c4857600080fd5b50565b600081359050612c5a81612c34565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cb382612c6a565b810181811067ffffffffffffffff82111715612cd257612cd1612c7b565b5b80604052505050565b6000612ce5612a1e565b9050612cf18282612caa565b919050565b600067ffffffffffffffff821115612d1157612d10612c7b565b5b612d1a82612c6a565b9050602081019050919050565b82818337600083830152505050565b6000612d49612d4484612cf6565b612cdb565b905082815260208101848484011115612d6557612d64612c65565b5b612d70848285612d27565b509392505050565b600082601f830112612d8d57612d8c612c60565b5b8135612d9d848260208601612d36565b91505092915050565b60008115159050919050565b612dbb81612da6565b8114612dc657600080fd5b50565b600081359050612dd881612db2565b92915050565b600080600080600080600080610100898b031215612dff57612dfe612a28565b5b6000612e0d8b828c01612a7b565b9850506020612e1e8b828c01612a7b565b9750506040612e2f8b828c01612bbe565b9650506060612e408b828c01612c4b565b9550506080612e518b828c01612a7b565b94505060a089013567ffffffffffffffff811115612e7257612e71612a2d565b5b612e7e8b828c01612d78565b93505060c0612e8f8b828c01612dc9565b92505060e0612ea08b828c01612dc9565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ee581612eb0565b8114612ef057600080fd5b50565b600081359050612f0281612edc565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f2d57612f2c612c7b565b5b602082029050602081019050919050565b600080fd5b60068110612f5057600080fd5b50565b600081359050612f6281612f43565b92915050565b6000612f7b612f7684612f12565b612cdb565b90508083825260208201905060208402830185811115612f9e57612f9d612f3e565b5b835b81811015612fc75780612fb38882612f53565b845260208401935050602081019050612fa0565b5050509392505050565b600082601f830112612fe657612fe5612c60565b5b8135612ff6848260208601612f68565b91505092915050565b600067ffffffffffffffff82111561301a57613019612c7b565b5b602082029050602081019050919050565b600061303e61303984612fff565b612cdb565b9050808382526020820190506020840283018581111561306157613060612f3e565b5b835b818110156130a857803567ffffffffffffffff81111561308657613085612c60565b5b8086016130938982612d78565b85526020850194505050602081019050613063565b5050509392505050565b600082601f8301126130c7576130c6612c60565b5b81356130d784826020860161302b565b91505092915050565b6000604082840312156130f6576130f5612f08565b5b6131006040612cdb565b9050600082013567ffffffffffffffff8111156131205761311f612f0d565b5b61312c84828501612fd1565b600083015250602082013567ffffffffffffffff8111156131505761314f612f0d565b5b61315c848285016130b2565b60208301525092915050565b600080600080600060a0868803121561318457613183612a28565b5b600061319288828901612a7b565b95505060206131a388828901612a7b565b94505060406131b488828901612ef3565b935050606086013567ffffffffffffffff8111156131d5576131d4612a2d565b5b6131e1888289016130e0565b92505060806131f288828901612a7b565b9150509295509295909350565b61320881612ae9565b82525050565b600060208201905061322360008301846131ff565b92915050565b600080fd5b60008083601f84011261324457613243612c60565b5b8235905067ffffffffffffffff81111561326157613260613229565b5b60208301915083600182028301111561327d5761327c612f3e565b5b9250929050565b600080fd5b60006040828403121561329f5761329e613284565b5b81905092915050565b6000806000806000608086880312156132c4576132c3612a28565b5b60006132d288828901612a7b565b955050602086013567ffffffffffffffff8111156132f3576132f2612a2d565b5b6132ff8882890161322e565b9450945050604086013567ffffffffffffffff81111561332257613321612a2d565b5b61332e88828901613289565b925050606061333f88828901612a7b565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b8381101561338657808201518184015260208101905061336b565b83811115613395576000848401525b50505050565b60006133a68261334c565b6133b08185613357565b93506133c0818560208601613368565b6133c981612c6a565b840191505092915050565b600060208201905081810360008301526133ee818461339b565b905092915050565b600061340182612a32565b9050919050565b613411816133f6565b82525050565b600060208201905061342c6000830184613408565b92915050565b600080600080600080600060e0888a03121561345157613450612a28565b5b600061345f8a828b01612a7b565b97505060206134708a828b01612a7b565b96505060406134818a828b01612bbe565b95505060606134928a828b01612bbe565b945050608088013567ffffffffffffffff8111156134b3576134b2612a2d565b5b6134bf8a828b01612d78565b93505060a06134d08a828b01612dc9565b92505060c06134e18a828b01612dc9565b91505092959891949750929550565b60008083601f84011261350657613505612c60565b5b8235905067ffffffffffffffff81111561352357613522613229565b5b60208301915083602082028301111561353f5761353e612f3e565b5b9250929050565b60008083601f84011261355c5761355b612c60565b5b8235905067ffffffffffffffff81111561357957613578613229565b5b60208301915083602082028301111561359557613594612f3e565b5b9250929050565b600080600080604085870312156135b6576135b5612a28565b5b600085013567ffffffffffffffff8111156135d4576135d3612a2d565b5b6135e0878288016134f0565b9450945050602085013567ffffffffffffffff81111561360357613602612a2d565b5b61360f87828801613546565b925092505092959194509250565b600060c0828403121561363357613632613284565b5b81905092915050565b600080600080600080610160878903121561365a57613659612a28565b5b600061366889828a01612a7b565b965050602061367989828a01612a7b565b955050604087013567ffffffffffffffff81111561369a57613699612a2d565b5b6136a689828a01612d78565b945050606087013567ffffffffffffffff8111156136c7576136c6612a2d565b5b6136d389828a01613289565b93505060806136e489828a0161361d565b9250506101406136f689828a01612dc9565b9150509295509295509295565b61370c81612c2a565b82525050565b60006020820190506137276000830184613703565b92915050565b60006040820190506137426000830185613703565b61374f6020830184612c00565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61377b81613756565b82525050565b60006040820190506137966000830185613772565b6137a36020830184613772565b9392505050565b6000602082840312156137c0576137bf612a28565b5b60006137ce84828501612f53565b91505092915050565b600080600080600080600060e0888a0312156137f6576137f5612a28565b5b60006138048a828b01612a7b565b97505060206138158a828b01612a7b565b965050604088013567ffffffffffffffff81111561383657613835612a2d565b5b6138428a828b01612d78565b955050606088013567ffffffffffffffff81111561386357613862612a2d565b5b61386f8a828b01613289565b94505060806138808a828b01612c4b565b93505060a06138918a828b01612a7b565b92505060c06138a28a828b01612dc9565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138e7601783613357565b91506138f2826138b1565b602082019050919050565b60006020820190508181036000830152613916816138da565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b6000613953601d83613357565b915061395e8261391d565b602082019050919050565b6000602082019050818103600083015261398281613946565b9050919050565b61399281612da6565b82525050565b60006080820190506139ad60008301876131ff565b6139ba6020830186613703565b6139c76040830185612c00565b6139d46060830184613989565b95945050505050565b60006139e936836130e0565b9050919050565b6000606082019050613a0560008301866131ff565b613a1260208301856131ff565b613a1f6040830184613989565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a5d600e83613357565b9150613a6882613a27565b602082019050919050565b60006020820190508181036000830152613a8c81613a50565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b2b82612c2a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b5d57613b5c613af1565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613b9457613b93613b68565b5b80840192508235915067ffffffffffffffff821115613bb657613bb5613b6d565b5b602083019250602082023603831315613bd257613bd1613b72565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0182613bda565b613c0b8185613be5565b9350613c1b818560208601613368565b613c2481612c6a565b840191505092915050565b60006060820190508181036000830152613c498186613bf6565b9050613c5860208301856131ff565b613c656040830184613989565b949350505050565b6000608082019050613c826000830187613703565b613c8f6020830186613703565b613c9c6040830185613703565b613ca960608301846131ff565b95945050505050565b600081905092915050565b6000613cc882613bda565b613cd28185613cb2565b9350613ce2818560208601613368565b80840191505092915050565b60008160601b9050919050565b6000613d0682613cee565b9050919050565b6000613d1882613cfb565b9050919050565b613d30613d2b82612a52565b613d0d565b82525050565b6000613d428285613cbd565b9150613d4e8284613d1f565b6014820191508190509392505050565b6000604082019050613d7360008301856131ff565b613d806020830184612c00565b9392505050565b613d9081612eb0565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613dd357613dd2613ac2565b5b50565b6000819050613de482613dc2565b919050565b6000613df482613dd6565b9050919050565b613e0481613de9565b82525050565b6000613e168383613dfb565b60208301905092915050565b6000602082019050919050565b6000613e3a82613d96565b613e448185613da1565b9350613e4f83613db2565b8060005b83811015613e80578151613e678882613e0a565b9750613e7283613e22565b925050600181019050613e53565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ed582613bda565b613edf8185613eb9565b9350613eef818560208601613368565b613ef881612c6a565b840191505092915050565b6000613f0f8383613eca565b905092915050565b6000602082019050919050565b6000613f2f82613e8d565b613f398185613e98565b935083602082028501613f4b85613ea9565b8060005b85811015613f875784840389528151613f688582613f03565b9450613f7383613f17565b925060208a01995050600181019050613f4f565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fb68282613e2f565b91505060208301518482036020860152613fd08282613f24565b9150508091505092915050565b600060a082019050613ff26000830188612c00565b613fff6020830187612c00565b61400c6040830186613d87565b818103606083015261401e8185613f99565b905061402d6080830184612c00565b9695505050505050565b600061404282612c2a565b915061404d83612c2a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408257614081613af1565b5b828201905092915050565b60006040820190506140a26000830185612c00565b6140af6020830184612c00565b9392505050565b6140bf816133f6565b81146140ca57600080fd5b50565b6000815190506140dc816140b6565b92915050565b600080604083850312156140f9576140f8612a28565b5b6000614107858286016140cd565b9250506020614118858286016140cd565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061417e602383613357565b915061418982614122565b604082019050919050565b600060208201905081810360008301526141ad81614171565b9050919050565b600060608201905081810360008301526141ce8186613bf6565b905081810360208301526141e28185613f99565b90506141f16040830184612c00565b949350505050565b60006020828403121561420f5761420e612a28565b5b600061421d848285016140cd565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b6000614282602383613357565b915061428d82614226565b604082019050919050565b600060208201905081810360008301526142b181614275565b9050919050565b60006142c48284613cbd565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b600061432b602583613357565b9150614336826142cf565b604082019050919050565b6000602082019050818103600083015261435a8161431e565b9050919050565b600060a08201905061437660008301886131ff565b6143836020830187612c00565b6143906040830186612c00565b81810360608301526143a28185613bf6565b905081810360808301526143b68184613bf6565b90509695505050505050565b60006080820190506143d760008301876131ff565b6143e46020830186612c00565b6143f16040830185612c00565b81810360608301526144038184613bf6565b905095945050505050565b600061442161441c84612cf6565b612cdb565b90508281526020810184848401111561443d5761443c612c65565b5b614448848285613368565b509392505050565b600082601f83011261446557614464612c60565b5b815161447584826020860161440e565b91505092915050565b6000806040838503121561449557614494612a28565b5b60006144a3858286016140cd565b925050602083015167ffffffffffffffff8111156144c4576144c3612a2d565b5b6144d085828601614450565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061451482612c2a565b915061451f83612c2a565b92508261452f5761452e6144da565b5b828206905092915050565b600081905092915050565b60006145508261334c565b61455a818561453a565b935061456a818560208601613368565b80840191505092915050565b60006145828285614545565b915061458e8284614545565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145d0600f8361453a565b91506145db8261459a565b600f82019050919050565b60006145f28284614545565b91506145fd826145c3565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061463e60148361453a565b915061464982614608565b601482019050919050565b60006146608284614545565b915061466b82614631565b915081905092915050565b600061468182612c2a565b915061468c83612c2a565b92508282101561469f5761469e613af1565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061470f602083613357565b915061471a826146d9565b602082019050919050565b6000602082019050818103600083015261473e81614702565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147a1602a83613357565b91506147ac82614745565b604082019050919050565b600060208201905081810360008301526147d081614794565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b6000614833603683613357565b915061483e826147d7565b604082019050919050565b6000602082019050818103600083015261486281614826565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148c5602983613357565b91506148d082614869565b604082019050919050565b600060208201905081810360008301526148f4816148b8565b905091905056fea26469706673582212201ea424cb154f91a78d903ce21fbd9aaea3001808fcb97341b656af505713ed9864736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101215760003560e01c806380381407116100ad578063b81cd86611610071578063b81cd8661461032f578063cd3d4fb914610360578063ddca3f4314610390578063e1d173a9146103ae578063ee8ca3b5146103ca57610121565b8063803814071461028c578063813785e6146102a8578063abf26d55146102c4578063ac21631a146102e0578063b810c6361461031057610121565b80633323b467116100f45780633323b467146101d257806354fd4d5014610202578063573ea57514610220578063647846a51461023e5780636d2dd29f1461025c57610121565b80630407145c146101265780632e6e0bd01461015657806330a9fe6a146101865780633140576e146101a2575b600080fd5b610140600480360381019061013b9190612a90565b6103e6565b60405161014d9190612b85565b60405180910390f35b610170600480360381019061016b9190612bd3565b61043c565b60405161017d9190612c0f565b60405180910390f35b6101a0600480360381019061019b9190612dde565b61046f565b005b6101bc60048036038101906101b79190613168565b61065c565b6040516101c9919061320e565b60405180910390f35b6101ec60048036038101906101e791906132a8565b610676565b6040516101f9919061320e565b60405180910390f35b61020a6106f3565b60405161021791906133d4565b60405180910390f35b61022861072c565b6040516102359190613417565b60405180910390f35b610246610750565b6040516102539190612c0f565b60405180910390f35b61027660048036038101906102719190612bd3565b610776565b6040516102839190612c0f565b60405180910390f35b6102a660048036038101906102a19190613432565b6107a9565b005b6102c260048036038101906102bd919061359c565b610920565b005b6102de60048036038101906102d9919061363c565b610a87565b005b6102fa60048036038101906102f59190612bd3565b610d57565b6040516103079190613712565b60405180910390f35b610318610d6f565b60405161032692919061372d565b60405180910390f35b61034960048036038101906103449190612bd3565b610da0565b604051610357929190613781565b60405180910390f35b61037a600480360381019061037591906137aa565b610dfc565b6040516103879190612c0f565b60405180910390f35b610398610e2f565b6040516103a59190613712565b60405180910390f35b6103c860048036038101906103c391906137d7565b610e35565b005b6103e460048036038101906103df9190612bd3565b6110c0565b005b60606000610431600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110de565b905080915050919050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f4906138fd565b60405180910390fd5b61054e86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b61058d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058490613969565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006105e7878a8a878787600261110a565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d878787846040516106499493929190613998565b60405180910390a1505050505050505050565b600061066b8686868686611211565b905095945050505050565b6000806106853388600661124d565b80985081925050506106e7818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050876106e1906139dd565b87611423565b91505095945050505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e906138fd565b60405180910390fd5b61088885600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b6108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be90613969565b60405180910390fd5b60006108d9868989878787600261110a565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c886868360405161090e939291906139f0565b60405180910390a15050505050505050565b6109286115a1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c90613a73565b60405180910390fd5b600084849050905060005b81811015610a7f578383828181106109bb576109ba613a93565b5b90506020020160208101906109d09190612a90565b600660008888858181106109e7576109e6613a93565b5b90506020020160208101906109fc91906137aa565b6005811115610a0e57610a0d613ac2565b5b6005811115610a2057610a1f613ac2565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610a7790613b20565b9150506109a0565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c906138fd565b60405180910390fd5b6000610b368787610b25886115ca565b87610b2f906139dd565b6000611211565b9050610b8981600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf90613969565b60405180910390fd5b6000610c2982898989898060000190610be19190613b77565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611743565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610c8f93929190613c2f565b60405180910390a4836020016020810190610caa9190612a90565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610cea9190612a90565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610d459493929190613c6d565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ec3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eba906138fd565b60405180910390fd5b6000610ee38888610ed3896115ca565b88610edd906139dd565b87611211565b9050610f3681600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b610f75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6c90613969565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061101e828a8a8a8a8060000190610fd69190613b77565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611743565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a86866040516110ad93929190613c2f565b60405180910390a4505050505050505050565b60006110ce823360066117eb565b90506110da81836119a8565b5050565b60606110ec82600001611ac7565b9050919050565b60006111028360000183611b23565b905092915050565b6000611170868689604051602001611123929190613d36565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b46565b50809150508215611206576111cb888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611be090919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0988886040516111fd929190613d5e565b60405180910390a15b979650505050505050565b6000858585858560405160200161122c959493929190613fdd565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561126757611266613ac2565b5b6112719190614037565b905060005b8181101561141357600081600581111561129357611292613ac2565b5b90506112b08160058111156112ab576112aa613ac2565b5b611bf7565b6112ba5750611400565b60008660008360058111156112d2576112d1613ac2565b5b60058111156112e4576112e3613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061131e81611c38565b60006376474e6a60e01b8a8a60405160240161133b92919061408d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006113dc83836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a200000000000000000815250611caa565b915050808060200190518101906113f391906140e2565b809b50819c505050505050505b808061140b90613b20565b915050611276565b5085859250925050935093915050565b600061143a8686611433876115ca565b8686611211565b905061148d81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b156114cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c490614194565b60405180910390fd5b6114dc81878787876006611d34565b61152d81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f0590919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d878787604051611590939291906141b4565b60405180910390a495945050505050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006018826003815181106115e2576115e1613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c60108360028151811061164657611645613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6008846001815181106116aa576116a9613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c8460008151811061170c5761170b613a93565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b6000806117508584611f1c565b9050611760898989898986612059565b80975081985050506117cc87878a60405160200161177f929190613d36565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611b46565b50809250506117df8989898989866121cc565b50979650505050505050565b60008060058081111561180157611800613ac2565b5b905060005b81811161199c57600081600581111561182257611821613ac2565b5b905061183f81600581111561183a57611839613ac2565b5b612312565b6118495750611989565b600085600083600581111561186157611860613ac2565b5b600581111561187357611872613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506118ad81611c38565b60006314ae992660e01b89896040516024016118ca929190613d5e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061196b83836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a200000000000000000815250611caa565b9150508080602001905181019061198291906141f9565b9850505050505b808061199490613b20565b915050611806565b50839150509392505050565b6119f981600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206110f390919063ffffffff16565b611a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2f90614298565b60405180910390fd5b611a8981600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611be090919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611abb929190613d5e565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611b1757602002820191906000526020600020905b815481526020019060010190808311611b03575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611b7091906142b8565b60006040518083038185875af1925050503d8060008114611bad576040519150601f19603f3d011682016040523d82523d6000602084013e611bb2565b606091505b50809250819350505081158015611bc65750835b15611bd657611bd58184612353565b5b9550959350505050565b6000611bef83600001836124ba565b905092915050565b600060026005811115611c0d57611c0c613ac2565b5b826005811115611c2057611c1f613ac2565b5b03611c2e5760019050611c33565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9e90614341565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff1684604051611cd391906142b8565b600060405180830381855af49150503d8060008114611d0e576040519150601f19603f3d011682016040523d82523d6000602084013e611d13565b606091505b50809250819350505081611d2c57611d2b8184612353565b5b935093915050565b60008260000151519050611d4b83600001516125ce565b60005b81811015611efb57600084600001518281518110611d6f57611d6e613a93565b5b60200260200101519050611d94816005811115611d8f57611d8e613ac2565b5b6128eb565b611d9e5750611ee8565b6000846000836005811115611db657611db5613ac2565b5b6005811115611dc857611dc7613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611e0281611c38565b600063b0ccbdf060e01b8b8b8b8b8b602001518981518110611e2757611e26613a93565b5b6020026020010151604051602401611e43959493929190614361565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611ee282826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a20000000000000000000815250611caa565b50505050505b8080611ef390613b20565b915050611d4e565b5050505050505050565b6000611f14836000018361292c565b905092915050565b606060008351905060008167ffffffffffffffff811115611f4057611f3f612c7b565b5b604051908082528060200260200182016040528015611f6e5781602001602082028036833780820191505090505b50905060005b8281101561204d57846000878381518110611f9257611f91613a93565b5b60200260200101516005811115611fac57611fab613ac2565b5b6005811115611fbe57611fbd613ac2565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061200057611fff613a93565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808061204590613b20565b915050611f74565b50809250505092915050565b6000606060008451905060005b818110156121b9576120a386828151811061208457612083613a93565b5b6020026020010151600581111561209e5761209d613ac2565b5b61299c565b156121a657600063c10304f760e01b8b8b8b8b6040516024016120c994939291906143c2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006121848784815181106121405761213f613a93565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a2000000000000000000000815250611caa565b9150508080602001905181019061219b919061447e565b809a50819b50505050505b80806121b190613b20565b915050612066565b5086869250925050965096945050505050565b60008151905060005b81811015612308576122128482815181106121f3576121f2613a93565b5b6020026020010151600581111561220d5761220c613ac2565b5b6129dd565b156122f557600063b2db0b4160e01b8989898960405160240161223894939291906143c2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506122f18483815181106122ad576122ac613a93565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a20000000000000000000815250611caa565b5050505b808061230090613b20565b9150506121d5565b5050505050505050565b60006002600581111561232857612327613ac2565b5b82600581111561233b5761233a613ac2565b5b03612349576001905061234e565b600090505b919050565b6004602083516123639190614509565b0361245e576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036124025760448301925081836040516020016123b7929190614576565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123f991906133d4565b60405180910390fd5b8160405160200161241391906145e6565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245591906133d4565b60405180910390fd5b8060405160200161246f9190614654565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124b191906133d4565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146125c25760006001826124ec9190614676565b90506000600186600001805490506125049190614676565b905081811461257357600086600001828154811061252557612524613a93565b5b906000526020600020015490508087600001848154811061254957612548613a93565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480612587576125866146aa565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506125c8565b60009150505b92915050565b600081519050600060016005808111156125eb576125ea613ac2565b5b6125f59190614037565b905060008167ffffffffffffffff81111561261357612612612c7b565b5b6040519080825280602002602001820160405280156126415781602001602082028036833780820191505090505b50905060005b838110156127655760008111156126ff57846001826126669190614676565b8151811061267757612676613a93565b5b6020026020010151600581111561269157612690613ac2565b5b8582815181106126a4576126a3613a93565b5b602002602001015160058111156126be576126bd613ac2565b5b116126fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f590614725565b60405180910390fd5b5b60018286838151811061271557612714613a93565b5b6020026020010151600581111561272f5761272e613ac2565b5b815181106127405761273f613a93565b5b602002602001019015159081151581525050808061275d90613b20565b915050612647565b50806001600581111561277b5761277a613ac2565b5b8151811061278c5761278b613a93565b5b6020026020010151156127d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127cb906147b7565b60405180910390fd5b80600060058111156127e9576127e8613ac2565b5b815181106127fa576127f9613a93565b5b602002602001015180156128385750806004600581111561281e5761281d613ac2565b5b8151811061282f5761282e613a93565b5b60200260200101515b15612878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286f90614849565b60405180910390fd5b806002600581111561288d5761288c613ac2565b5b8151811061289e5761289d613a93565b5b60200260200101516128e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128dc906148db565b60405180910390fd5b50505050565b60006002600581111561290157612900613ac2565b5b82600581111561291457612913613ac2565b5b036129225760019050612927565b600090505b919050565b60006129388383611b23565b612991578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612996565b600090505b92915050565b6000600260058111156129b2576129b1613ac2565b5b8260058111156129c5576129c4613ac2565b5b036129d357600190506129d8565b600090505b919050565b6000600360058111156129f3576129f2613ac2565b5b826005811115612a0657612a05613ac2565b5b03612a145760019050612a19565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a5d82612a32565b9050919050565b612a6d81612a52565b8114612a7857600080fd5b50565b600081359050612a8a81612a64565b92915050565b600060208284031215612aa657612aa5612a28565b5b6000612ab484828501612a7b565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612afc81612ae9565b82525050565b6000612b0e8383612af3565b60208301905092915050565b6000602082019050919050565b6000612b3282612abd565b612b3c8185612ac8565b9350612b4783612ad9565b8060005b83811015612b78578151612b5f8882612b02565b9750612b6a83612b1a565b925050600181019050612b4b565b5085935050505092915050565b60006020820190508181036000830152612b9f8184612b27565b905092915050565b612bb081612ae9565b8114612bbb57600080fd5b50565b600081359050612bcd81612ba7565b92915050565b600060208284031215612be957612be8612a28565b5b6000612bf784828501612bbe565b91505092915050565b612c0981612a52565b82525050565b6000602082019050612c246000830184612c00565b92915050565b6000819050919050565b612c3d81612c2a565b8114612c4857600080fd5b50565b600081359050612c5a81612c34565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612cb382612c6a565b810181811067ffffffffffffffff82111715612cd257612cd1612c7b565b5b80604052505050565b6000612ce5612a1e565b9050612cf18282612caa565b919050565b600067ffffffffffffffff821115612d1157612d10612c7b565b5b612d1a82612c6a565b9050602081019050919050565b82818337600083830152505050565b6000612d49612d4484612cf6565b612cdb565b905082815260208101848484011115612d6557612d64612c65565b5b612d70848285612d27565b509392505050565b600082601f830112612d8d57612d8c612c60565b5b8135612d9d848260208601612d36565b91505092915050565b60008115159050919050565b612dbb81612da6565b8114612dc657600080fd5b50565b600081359050612dd881612db2565b92915050565b600080600080600080600080610100898b031215612dff57612dfe612a28565b5b6000612e0d8b828c01612a7b565b9850506020612e1e8b828c01612a7b565b9750506040612e2f8b828c01612bbe565b9650506060612e408b828c01612c4b565b9550506080612e518b828c01612a7b565b94505060a089013567ffffffffffffffff811115612e7257612e71612a2d565b5b612e7e8b828c01612d78565b93505060c0612e8f8b828c01612dc9565b92505060e0612ea08b828c01612dc9565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612ee581612eb0565b8114612ef057600080fd5b50565b600081359050612f0281612edc565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff821115612f2d57612f2c612c7b565b5b602082029050602081019050919050565b600080fd5b60068110612f5057600080fd5b50565b600081359050612f6281612f43565b92915050565b6000612f7b612f7684612f12565b612cdb565b90508083825260208201905060208402830185811115612f9e57612f9d612f3e565b5b835b81811015612fc75780612fb38882612f53565b845260208401935050602081019050612fa0565b5050509392505050565b600082601f830112612fe657612fe5612c60565b5b8135612ff6848260208601612f68565b91505092915050565b600067ffffffffffffffff82111561301a57613019612c7b565b5b602082029050602081019050919050565b600061303e61303984612fff565b612cdb565b9050808382526020820190506020840283018581111561306157613060612f3e565b5b835b818110156130a857803567ffffffffffffffff81111561308657613085612c60565b5b8086016130938982612d78565b85526020850194505050602081019050613063565b5050509392505050565b600082601f8301126130c7576130c6612c60565b5b81356130d784826020860161302b565b91505092915050565b6000604082840312156130f6576130f5612f08565b5b6131006040612cdb565b9050600082013567ffffffffffffffff8111156131205761311f612f0d565b5b61312c84828501612fd1565b600083015250602082013567ffffffffffffffff8111156131505761314f612f0d565b5b61315c848285016130b2565b60208301525092915050565b600080600080600060a0868803121561318457613183612a28565b5b600061319288828901612a7b565b95505060206131a388828901612a7b565b94505060406131b488828901612ef3565b935050606086013567ffffffffffffffff8111156131d5576131d4612a2d565b5b6131e1888289016130e0565b92505060806131f288828901612a7b565b9150509295509295909350565b61320881612ae9565b82525050565b600060208201905061322360008301846131ff565b92915050565b600080fd5b60008083601f84011261324457613243612c60565b5b8235905067ffffffffffffffff81111561326157613260613229565b5b60208301915083600182028301111561327d5761327c612f3e565b5b9250929050565b600080fd5b60006040828403121561329f5761329e613284565b5b81905092915050565b6000806000806000608086880312156132c4576132c3612a28565b5b60006132d288828901612a7b565b955050602086013567ffffffffffffffff8111156132f3576132f2612a2d565b5b6132ff8882890161322e565b9450945050604086013567ffffffffffffffff81111561332257613321612a2d565b5b61332e88828901613289565b925050606061333f88828901612a7b565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b8381101561338657808201518184015260208101905061336b565b83811115613395576000848401525b50505050565b60006133a68261334c565b6133b08185613357565b93506133c0818560208601613368565b6133c981612c6a565b840191505092915050565b600060208201905081810360008301526133ee818461339b565b905092915050565b600061340182612a32565b9050919050565b613411816133f6565b82525050565b600060208201905061342c6000830184613408565b92915050565b600080600080600080600060e0888a03121561345157613450612a28565b5b600061345f8a828b01612a7b565b97505060206134708a828b01612a7b565b96505060406134818a828b01612bbe565b95505060606134928a828b01612bbe565b945050608088013567ffffffffffffffff8111156134b3576134b2612a2d565b5b6134bf8a828b01612d78565b93505060a06134d08a828b01612dc9565b92505060c06134e18a828b01612dc9565b91505092959891949750929550565b60008083601f84011261350657613505612c60565b5b8235905067ffffffffffffffff81111561352357613522613229565b5b60208301915083602082028301111561353f5761353e612f3e565b5b9250929050565b60008083601f84011261355c5761355b612c60565b5b8235905067ffffffffffffffff81111561357957613578613229565b5b60208301915083602082028301111561359557613594612f3e565b5b9250929050565b600080600080604085870312156135b6576135b5612a28565b5b600085013567ffffffffffffffff8111156135d4576135d3612a2d565b5b6135e0878288016134f0565b9450945050602085013567ffffffffffffffff81111561360357613602612a2d565b5b61360f87828801613546565b925092505092959194509250565b600060c0828403121561363357613632613284565b5b81905092915050565b600080600080600080610160878903121561365a57613659612a28565b5b600061366889828a01612a7b565b965050602061367989828a01612a7b565b955050604087013567ffffffffffffffff81111561369a57613699612a2d565b5b6136a689828a01612d78565b945050606087013567ffffffffffffffff8111156136c7576136c6612a2d565b5b6136d389828a01613289565b93505060806136e489828a0161361d565b9250506101406136f689828a01612dc9565b9150509295509295509295565b61370c81612c2a565b82525050565b60006020820190506137276000830184613703565b92915050565b60006040820190506137426000830185613703565b61374f6020830184612c00565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b61377b81613756565b82525050565b60006040820190506137966000830185613772565b6137a36020830184613772565b9392505050565b6000602082840312156137c0576137bf612a28565b5b60006137ce84828501612f53565b91505092915050565b600080600080600080600060e0888a0312156137f6576137f5612a28565b5b60006138048a828b01612a7b565b97505060206138158a828b01612a7b565b965050604088013567ffffffffffffffff81111561383657613835612a2d565b5b6138428a828b01612d78565b955050606088013567ffffffffffffffff81111561386357613862612a2d565b5b61386f8a828b01613289565b94505060806138808a828b01612c4b565b93505060a06138918a828b01612a7b565b92505060c06138a28a828b01612dc9565b91505092959891949750929550565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b60006138e7601783613357565b91506138f2826138b1565b602082019050919050565b60006020820190508181036000830152613916816138da565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b6000613953601d83613357565b915061395e8261391d565b602082019050919050565b6000602082019050818103600083015261398281613946565b9050919050565b61399281612da6565b82525050565b60006080820190506139ad60008301876131ff565b6139ba6020830186613703565b6139c76040830185612c00565b6139d46060830184613989565b95945050505050565b60006139e936836130e0565b9050919050565b6000606082019050613a0560008301866131ff565b613a1260208301856131ff565b613a1f6040830184613989565b949350505050565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613a5d600e83613357565b9150613a6882613a27565b602082019050919050565b60006020820190508181036000830152613a8c81613a50565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613b2b82612c2a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613b5d57613b5c613af1565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112613b9457613b93613b68565b5b80840192508235915067ffffffffffffffff821115613bb657613bb5613b6d565b5b602083019250602082023603831315613bd257613bd1613b72565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b6000613c0182613bda565b613c0b8185613be5565b9350613c1b818560208601613368565b613c2481612c6a565b840191505092915050565b60006060820190508181036000830152613c498186613bf6565b9050613c5860208301856131ff565b613c656040830184613989565b949350505050565b6000608082019050613c826000830187613703565b613c8f6020830186613703565b613c9c6040830185613703565b613ca960608301846131ff565b95945050505050565b600081905092915050565b6000613cc882613bda565b613cd28185613cb2565b9350613ce2818560208601613368565b80840191505092915050565b60008160601b9050919050565b6000613d0682613cee565b9050919050565b6000613d1882613cfb565b9050919050565b613d30613d2b82612a52565b613d0d565b82525050565b6000613d428285613cbd565b9150613d4e8284613d1f565b6014820191508190509392505050565b6000604082019050613d7360008301856131ff565b613d806020830184612c00565b9392505050565b613d9081612eb0565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60068110613dd357613dd2613ac2565b5b50565b6000819050613de482613dc2565b919050565b6000613df482613dd6565b9050919050565b613e0481613de9565b82525050565b6000613e168383613dfb565b60208301905092915050565b6000602082019050919050565b6000613e3a82613d96565b613e448185613da1565b9350613e4f83613db2565b8060005b83811015613e80578151613e678882613e0a565b9750613e7283613e22565b925050600181019050613e53565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b6000613ed582613bda565b613edf8185613eb9565b9350613eef818560208601613368565b613ef881612c6a565b840191505092915050565b6000613f0f8383613eca565b905092915050565b6000602082019050919050565b6000613f2f82613e8d565b613f398185613e98565b935083602082028501613f4b85613ea9565b8060005b85811015613f875784840389528151613f688582613f03565b9450613f7383613f17565b925060208a01995050600181019050613f4f565b50829750879550505050505092915050565b60006040830160008301518482036000860152613fb68282613e2f565b91505060208301518482036020860152613fd08282613f24565b9150508091505092915050565b600060a082019050613ff26000830188612c00565b613fff6020830187612c00565b61400c6040830186613d87565b818103606083015261401e8185613f99565b905061402d6080830184612c00565b9695505050505050565b600061404282612c2a565b915061404d83612c2a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561408257614081613af1565b5b828201905092915050565b60006040820190506140a26000830185612c00565b6140af6020830184612c00565b9392505050565b6140bf816133f6565b81146140ca57600080fd5b50565b6000815190506140dc816140b6565b92915050565b600080604083850312156140f9576140f8612a28565b5b6000614107858286016140cd565b9250506020614118858286016140cd565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b600061417e602383613357565b915061418982614122565b604082019050919050565b600060208201905081810360008301526141ad81614171565b9050919050565b600060608201905081810360008301526141ce8186613bf6565b905081810360208301526141e28185613f99565b90506141f16040830184612c00565b949350505050565b60006020828403121561420f5761420e612a28565b5b600061421d848285016140cd565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b6000614282602383613357565b915061428d82614226565b604082019050919050565b600060208201905081810360008301526142b181614275565b9050919050565b60006142c48284613cbd565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b600061432b602583613357565b9150614336826142cf565b604082019050919050565b6000602082019050818103600083015261435a8161431e565b9050919050565b600060a08201905061437660008301886131ff565b6143836020830187612c00565b6143906040830186612c00565b81810360608301526143a28185613bf6565b905081810360808301526143b68184613bf6565b90509695505050505050565b60006080820190506143d760008301876131ff565b6143e46020830186612c00565b6143f16040830185612c00565b81810360608301526144038184613bf6565b905095945050505050565b600061442161441c84612cf6565b612cdb565b90508281526020810184848401111561443d5761443c612c65565b5b614448848285613368565b509392505050565b600082601f83011261446557614464612c60565b5b815161447584826020860161440e565b91505092915050565b6000806040838503121561449557614494612a28565b5b60006144a3858286016140cd565b925050602083015167ffffffffffffffff8111156144c4576144c3612a2d565b5b6144d085828601614450565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061451482612c2a565b915061451f83612c2a565b92508261452f5761452e6144da565b5b828206905092915050565b600081905092915050565b60006145508261334c565b61455a818561453a565b935061456a818560208601613368565b80840191505092915050565b60006145828285614545565b915061458e8284614545565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b60006145d0600f8361453a565b91506145db8261459a565b600f82019050919050565b60006145f28284614545565b91506145fd826145c3565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b600061463e60148361453a565b915061464982614608565b601482019050919050565b60006146608284614545565b915061466b82614631565b915081905092915050565b600061468182612c2a565b915061468c83612c2a565b92508282101561469f5761469e613af1565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b600061470f602083613357565b915061471a826146d9565b602082019050919050565b6000602082019050818103600083015261473e81614702565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b60006147a1602a83613357565b91506147ac82614745565b604082019050919050565b600060208201905081810360008301526147d081614794565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b6000614833603683613357565b915061483e826147d7565b604082019050919050565b6000602082019050818103600083015261486281614826565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b60006148c5602983613357565b91506148d082614869565b604082019050919050565b600060208201905081810360008301526148f4816148b8565b905091905056fea26469706673582212201ea424cb154f91a78d903ce21fbd9aaea3001808fcb97341b656af505713ed9864736f6c634300080e0033", + "args": [ + "0xFec1E33eBe899906Ff63546868A26E1028700b0e" + ], + "numDeployments": 3, + "solcInputHash": "a453e7a18519fd07c1a882fb1953995f", + "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\":[],\"name\":\"BLAST\",\"outputs\":[{\"internalType\":\"contract IBlast\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskId\",\"type\":\"bytes32\"}],\"name\":\"cancelTask\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"claimAllGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"claimMaxGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"configureClaimableGas\",\"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.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 IERC20 {\\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(\\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(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0xbbc8ac883ac3c0078ce5ad3e288fbb3ffcc8a30c3a98c0fda0114d64fc44fca2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.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 function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) 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(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) 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 function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\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 if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 *\\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \\\"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(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) 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 require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\\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 * ```\\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 */\\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 return _values(set._inner);\\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 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 on 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 assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9772845c886f87a3aab315f8d6b68aa599027c20f441b131cd4afaf65b588900\",\"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 {BlastGasFees} from \\\"./vendor/blast/BlastGasFees.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, BlastGasFees, 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\":\"0x07896fdbdad6ff7cd6f601498440d017588a0f0fef5f58d7daea5471256586e0\",\"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/blast/BlastGasFees.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.14;\\n\\nimport {Proxied} from \\\"../proxy/EIP173/Proxied.sol\\\";\\nimport {IBlast} from \\\"./interfaces/IBlast.sol\\\";\\n\\ncontract BlastGasFees is Proxied {\\n IBlast public constant BLAST =\\n IBlast(0x4300000000000000000000000000000000000002);\\n\\n function configureClaimableGas() external onlyProxyAdmin {\\n BLAST.configureClaimableGas();\\n }\\n\\n function claimAllGas(address _recipient) external onlyProxyAdmin {\\n BLAST.claimAllGas(address(this), _recipient);\\n }\\n\\n function claimMaxGas(address _recipient) external onlyProxyAdmin {\\n BLAST.claimMaxGas(address(this), _recipient);\\n }\\n}\\n\",\"keccak256\":\"0x7d8d7096eb336ba6ab9c137fb54886c1c4ea7e07bcfca501f577151f92e7dfa4\",\"license\":\"UNLICENSED\"},\"contracts/vendor/blast/interfaces/IBlast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nenum YieldMode {\\n AUTOMATIC,\\n VOID,\\n CLAIMABLE\\n}\\n\\nenum GasMode {\\n VOID,\\n CLAIMABLE\\n}\\n\\ninterface IBlast {\\n // configure\\n function configureContract(\\n address contractAddress,\\n YieldMode _yield,\\n GasMode gasMode,\\n address governor\\n ) external;\\n\\n function configure(\\n YieldMode _yield,\\n GasMode gasMode,\\n address governor\\n ) external;\\n\\n // base configuration options\\n function configureClaimableYield() external;\\n\\n function configureClaimableYieldOnBehalf(address contractAddress) external;\\n\\n function configureAutomaticYield() external;\\n\\n function configureAutomaticYieldOnBehalf(address contractAddress) external;\\n\\n function configureVoidYield() external;\\n\\n function configureVoidYieldOnBehalf(address contractAddress) external;\\n\\n function configureClaimableGas() external;\\n\\n function configureClaimableGasOnBehalf(address contractAddress) external;\\n\\n function configureVoidGas() external;\\n\\n function configureVoidGasOnBehalf(address contractAddress) external;\\n\\n function configureGovernor(address _governor) external;\\n\\n function configureGovernorOnBehalf(\\n address _newGovernor,\\n address contractAddress\\n ) external;\\n\\n // claim yield\\n function claimYield(\\n address contractAddress,\\n address recipientOfYield,\\n uint256 amount\\n ) external returns (uint256);\\n\\n function claimAllYield(address contractAddress, address recipientOfYield)\\n external\\n returns (uint256);\\n\\n // claim gas\\n function claimAllGas(address contractAddress, address recipientOfGas)\\n external\\n returns (uint256);\\n\\n function claimGasAtMinClaimRate(\\n address contractAddress,\\n address recipientOfGas,\\n uint256 minClaimRateBips\\n ) external returns (uint256);\\n\\n function claimMaxGas(address contractAddress, address recipientOfGas)\\n external\\n returns (uint256);\\n\\n function claimGas(\\n address contractAddress,\\n address recipientOfGas,\\n uint256 gasToClaim,\\n uint256 gasSecondsToConsume\\n ) external returns (uint256);\\n\\n // read functions\\n function readClaimableYield(address contractAddress)\\n external\\n view\\n returns (uint256);\\n\\n function readYieldConfiguration(address contractAddress)\\n external\\n view\\n returns (uint8);\\n\\n function readGasParams(address contractAddress)\\n external\\n view\\n returns (\\n uint256 etherSeconds,\\n uint256 etherBalance,\\n uint256 lastUpdated,\\n GasMode\\n );\\n}\\n\",\"keccak256\":\"0x4c4aea89e21afaa3a30b5252becf45435e87da34679a743d52c034077b1fe1e1\",\"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": "0x60a06040523480156200001157600080fd5b5060405162004eda38038062004eda8339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b608051614d926200014860003960008181610608015281816109b001528181610a2d01528181610d2301526111dc0152614d926000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806380381407116100c3578063b81cd8661161007c578063b81cd8661461039f578063cd2002f5146103d0578063cd3d4fb9146103ec578063ddca3f431461041c578063e1d173a91461043a578063ee8ca3b5146104565761014d565b806380381407146102de578063813785e6146102fa57806397d7577614610316578063abf26d5514610334578063ac21631a14610350578063b810c636146103805761014d565b80633323b467116101155780633323b4671461021a5780634e606c471461024a57806354fd4d5014610254578063573ea57514610272578063647846a5146102905780636d2dd29f146102ae5761014d565b80630407145c14610152578063272b1323146101825780632e6e0bd01461019e57806330a9fe6a146101ce5780633140576e146101ea575b600080fd5b61016c60048036038101906101679190612e35565b610472565b6040516101799190612f2a565b60405180910390f35b61019c60048036038101906101979190612e35565b6104c8565b005b6101b860048036038101906101b39190612f78565b6105d3565b6040516101c59190612fb4565b60405180910390f35b6101e860048036038101906101e39190613183565b610606565b005b61020460048036038101906101ff919061350d565b6107f3565b60405161021191906135b3565b60405180910390f35b610234600480360381019061022f919061364d565b61080d565b60405161024191906135b3565b60405180910390f35b61025261088a565b005b61025c610975565b6040516102699190613779565b60405180910390f35b61027a6109ae565b60405161028791906137bc565b60405180910390f35b6102986109d2565b6040516102a59190612fb4565b60405180910390f35b6102c860048036038101906102c39190612f78565b6109f8565b6040516102d59190612fb4565b60405180910390f35b6102f860048036038101906102f391906137d7565b610a2b565b005b610314600480360381019061030f9190613941565b610ba2565b005b61031e610d09565b60405161032b9190613a21565b60405180910390f35b61034e60048036038101906103499190613a5b565b610d21565b005b61036a60048036038101906103659190612f78565b610ff1565b6040516103779190613b31565b60405180910390f35b610388611009565b604051610396929190613b4c565b60405180910390f35b6103b960048036038101906103b49190612f78565b61103a565b6040516103c7929190613ba0565b60405180910390f35b6103ea60048036038101906103e59190612e35565b611096565b005b61040660048036038101906104019190613bc9565b6111a1565b6040516104139190612fb4565b60405180910390f35b6104246111d4565b6040516104319190613b31565b60405180910390f35b610454600480360381019061044f9190613bf6565b6111da565b005b610470600480360381019061046b9190612f78565b611465565b005b606060006104bd600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611483565b905080915050919050565b6104d0611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461053d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053490613d1c565b60405180910390fd5b73430000000000000000000000000000000000000273ffffffffffffffffffffffffffffffffffffffff1663954fa5ee30836040518363ffffffff1660e01b815260040161058c929190613d3c565b6020604051808303816000875af11580156105ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cf9190613d7a565b5050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068b90613df3565b60405180910390fd5b6106e586600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b610724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071b90613e5f565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061077e878a8a87878760026114d8565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d878787846040516107e09493929190613e8e565b60405180910390a1505050505050505050565b600061080286868686866115df565b905095945050505050565b60008061081c3388600661161b565b809850819250505061087e818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508761087890613ed3565b876117f1565b91505095945050505050565b610892611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690613d1c565b60405180910390fd5b73430000000000000000000000000000000000000273ffffffffffffffffffffffffffffffffffffffff16634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561095b57600080fd5b505af115801561096f573d6000803e3d6000fd5b50505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab090613df3565b60405180910390fd5b610b0a85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b610b49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4090613e5f565b60405180910390fd5b6000610b5b86898987878760026114d8565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c8868683604051610b9093929190613ee6565b60405180910390a15050505050505050565b610baa611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0e90613d1c565b60405180910390fd5b600084849050905060005b81811015610d0157838382818110610c3d57610c3c613f1d565b5b9050602002016020810190610c529190612e35565b60066000888885818110610c6957610c68613f1d565b5b9050602002016020810190610c7e9190613bc9565b6005811115610c9057610c8f613f4c565b5b6005811115610ca257610ca1613f4c565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610cf990613faa565b915050610c22565b505050505050565b73430000000000000000000000000000000000000281565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da690613df3565b60405180910390fd5b6000610dd08787610dbf8861196f565b87610dc990613ed3565b60006115df565b9050610e2381600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b610e62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5990613e5f565b60405180910390fd5b6000610ec382898989898060000190610e7b9190614001565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611ae8565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610f29939291906140b9565b60405180910390a4836020016020810190610f449190612e35565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610f849190612e35565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610fdf94939291906140f7565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b61109e611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461110b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110290613d1c565b60405180910390fd5b73430000000000000000000000000000000000000273ffffffffffffffffffffffffffffffffffffffff1663662aa11d30836040518363ffffffff1660e01b815260040161115a929190613d3c565b6020604051808303816000875af1158015611179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119d9190613d7a565b5050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125f90613df3565b60405180910390fd5b600061128888886112788961196f565b8861128290613ed3565b876115df565b90506112db81600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b61131a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131190613e5f565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006113c3828a8a8a8a806000019061137b9190614001565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611ae8565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a8686604051611452939291906140b9565b60405180910390a4505050505050505050565b600061147382336006611b90565b905061147f8183611d4d565b5050565b606061149182600001611e6c565b9050919050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006114d08360000183611ec8565b905092915050565b600061153e8686896040516020016114f19291906141c0565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611eeb565b508091505082156115d457611599888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f8590919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0988886040516115cb9291906141e8565b60405180910390a15b979650505050505050565b600085858585856040516020016115fa959493929190614467565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561163557611634613f4c565b5b61163f91906144c1565b905060005b818110156117e157600081600581111561166157611660613f4c565b5b905061167e81600581111561167957611678613f4c565b5b611f9c565b61168857506117ce565b60008660008360058111156116a05761169f613f4c565b5b60058111156116b2576116b1613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506116ec81611fdd565b60006376474e6a60e01b8a8a604051602401611709929190613d3c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006117aa83836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a20000000000000000081525061204f565b915050808060200190518101906117c19190614543565b809b50819c505050505050505b80806117d990613faa565b915050611644565b5085859250925050935093915050565b600061180886866118018761196f565b86866115df565b905061185b81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b1561189b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611892906145f5565b60405180910390fd5b6118aa818787878760066120d9565b6118fb81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206122aa90919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161195e93929190614615565b60405180910390a495945050505050565b600060188260038151811061198757611986613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6010836002815181106119eb576119ea613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c600884600181518110611a4f57611a4e613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c84600081518110611ab157611ab0613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b600080611af585846122c1565b9050611b058989898989866123fe565b8097508198505050611b7187878a604051602001611b249291906141c0565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611eeb565b5080925050611b84898989898986612571565b50979650505050505050565b600080600580811115611ba657611ba5613f4c565b5b905060005b818111611d41576000816005811115611bc757611bc6613f4c565b5b9050611be4816005811115611bdf57611bde613f4c565b5b6126b7565b611bee5750611d2e565b6000856000836005811115611c0657611c05613f4c565b5b6005811115611c1857611c17613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611c5281611fdd565b60006314ae992660e01b8989604051602401611c6f9291906141e8565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000611d1083836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a20000000000000000081525061204f565b91505080806020019051810190611d27919061465a565b9850505050505b8080611d3990613faa565b915050611bab565b50839150509392505050565b611d9e81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b611ddd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd4906146f9565b60405180910390fd5b611e2e81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f8590919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611e609291906141e8565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611ebc57602002820191906000526020600020905b815481526020019060010190808311611ea8575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611f159190614719565b60006040518083038185875af1925050503d8060008114611f52576040519150601f19603f3d011682016040523d82523d6000602084013e611f57565b606091505b50809250819350505081158015611f6b5750835b15611f7b57611f7a81846126f8565b5b9550959350505050565b6000611f94836000018361285f565b905092915050565b600060026005811115611fb257611fb1613f4c565b5b826005811115611fc557611fc4613f4c565b5b03611fd35760019050611fd8565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361204c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612043906147a2565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff16846040516120789190614719565b600060405180830381855af49150503d80600081146120b3576040519150601f19603f3d011682016040523d82523d6000602084013e6120b8565b606091505b508092508193505050816120d1576120d081846126f8565b5b935093915050565b600082600001515190506120f08360000151612973565b60005b818110156122a05760008460000151828151811061211457612113613f1d565b5b6020026020010151905061213981600581111561213457612133613f4c565b5b612c90565b612143575061228d565b600084600083600581111561215b5761215a613f4c565b5b600581111561216d5761216c613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506121a781611fdd565b600063b0ccbdf060e01b8b8b8b8b8b6020015189815181106121cc576121cb613f1d565b5b60200260200101516040516024016121e89594939291906147c2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061228782826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a2000000000000000000081525061204f565b50505050505b808061229890613faa565b9150506120f3565b5050505050505050565b60006122b98360000183612cd1565b905092915050565b606060008351905060008167ffffffffffffffff8111156122e5576122e4613020565b5b6040519080825280602002602001820160405280156123135781602001602082028036833780820191505090505b50905060005b828110156123f25784600087838151811061233757612336613f1d565b5b6020026020010151600581111561235157612350613f4c565b5b600581111561236357612362613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106123a5576123a4613f1d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806123ea90613faa565b915050612319565b50809250505092915050565b6000606060008451905060005b8181101561255e5761244886828151811061242957612428613f1d565b5b6020026020010151600581111561244357612442613f4c565b5b612d41565b1561254b57600063c10304f760e01b8b8b8b8b60405160240161246e9493929190614823565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006125298784815181106124e5576124e4613f1d565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a200000000000000000000081525061204f565b9150508080602001905181019061254091906148df565b809a50819b50505050505b808061255690613faa565b91505061240b565b5086869250925050965096945050505050565b60008151905060005b818110156126ad576125b784828151811061259857612597613f1d565b5b602002602001015160058111156125b2576125b1613f4c565b5b612d82565b1561269a57600063b2db0b4160e01b898989896040516024016125dd9493929190614823565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061269684838151811061265257612651613f1d565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a2000000000000000000081525061204f565b5050505b80806126a590613faa565b91505061257a565b5050505050505050565b6000600260058111156126cd576126cc613f4c565b5b8260058111156126e0576126df613f4c565b5b036126ee57600190506126f3565b600090505b919050565b600460208351612708919061496a565b03612803576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036127a757604483019250818360405160200161275c9291906149d7565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279e9190613779565b60405180910390fd5b816040516020016127b89190614a47565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127fa9190613779565b60405180910390fd5b806040516020016128149190614ab5565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128569190613779565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146129675760006001826128919190614ad7565b90506000600186600001805490506128a99190614ad7565b90508181146129185760008660000182815481106128ca576128c9613f1d565b5b90600052602060002001549050808760000184815481106128ee576128ed613f1d565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061292c5761292b614b0b565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061296d565b60009150505b92915050565b600081519050600060016005808111156129905761298f613f4c565b5b61299a91906144c1565b905060008167ffffffffffffffff8111156129b8576129b7613020565b5b6040519080825280602002602001820160405280156129e65781602001602082028036833780820191505090505b50905060005b83811015612b0a576000811115612aa45784600182612a0b9190614ad7565b81518110612a1c57612a1b613f1d565b5b60200260200101516005811115612a3657612a35613f4c565b5b858281518110612a4957612a48613f1d565b5b60200260200101516005811115612a6357612a62613f4c565b5b11612aa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9a90614b86565b60405180910390fd5b5b600182868381518110612aba57612ab9613f1d565b5b60200260200101516005811115612ad457612ad3613f4c565b5b81518110612ae557612ae4613f1d565b5b6020026020010190151590811515815250508080612b0290613faa565b9150506129ec565b508060016005811115612b2057612b1f613f4c565b5b81518110612b3157612b30613f1d565b5b602002602001015115612b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7090614c18565b60405180910390fd5b8060006005811115612b8e57612b8d613f4c565b5b81518110612b9f57612b9e613f1d565b5b60200260200101518015612bdd57508060046005811115612bc357612bc2613f4c565b5b81518110612bd457612bd3613f1d565b5b60200260200101515b15612c1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1490614caa565b60405180910390fd5b8060026005811115612c3257612c31613f4c565b5b81518110612c4357612c42613f1d565b5b6020026020010151612c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8190614d3c565b60405180910390fd5b50505050565b600060026005811115612ca657612ca5613f4c565b5b826005811115612cb957612cb8613f4c565b5b03612cc75760019050612ccc565b600090505b919050565b6000612cdd8383611ec8565b612d36578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612d3b565b600090505b92915050565b600060026005811115612d5757612d56613f4c565b5b826005811115612d6a57612d69613f4c565b5b03612d785760019050612d7d565b600090505b919050565b600060036005811115612d9857612d97613f4c565b5b826005811115612dab57612daa613f4c565b5b03612db95760019050612dbe565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612e0282612dd7565b9050919050565b612e1281612df7565b8114612e1d57600080fd5b50565b600081359050612e2f81612e09565b92915050565b600060208284031215612e4b57612e4a612dcd565b5b6000612e5984828501612e20565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612ea181612e8e565b82525050565b6000612eb38383612e98565b60208301905092915050565b6000602082019050919050565b6000612ed782612e62565b612ee18185612e6d565b9350612eec83612e7e565b8060005b83811015612f1d578151612f048882612ea7565b9750612f0f83612ebf565b925050600181019050612ef0565b5085935050505092915050565b60006020820190508181036000830152612f448184612ecc565b905092915050565b612f5581612e8e565b8114612f6057600080fd5b50565b600081359050612f7281612f4c565b92915050565b600060208284031215612f8e57612f8d612dcd565b5b6000612f9c84828501612f63565b91505092915050565b612fae81612df7565b82525050565b6000602082019050612fc96000830184612fa5565b92915050565b6000819050919050565b612fe281612fcf565b8114612fed57600080fd5b50565b600081359050612fff81612fd9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6130588261300f565b810181811067ffffffffffffffff8211171561307757613076613020565b5b80604052505050565b600061308a612dc3565b9050613096828261304f565b919050565b600067ffffffffffffffff8211156130b6576130b5613020565b5b6130bf8261300f565b9050602081019050919050565b82818337600083830152505050565b60006130ee6130e98461309b565b613080565b90508281526020810184848401111561310a5761310961300a565b5b6131158482856130cc565b509392505050565b600082601f83011261313257613131613005565b5b81356131428482602086016130db565b91505092915050565b60008115159050919050565b6131608161314b565b811461316b57600080fd5b50565b60008135905061317d81613157565b92915050565b600080600080600080600080610100898b0312156131a4576131a3612dcd565b5b60006131b28b828c01612e20565b98505060206131c38b828c01612e20565b97505060406131d48b828c01612f63565b96505060606131e58b828c01612ff0565b95505060806131f68b828c01612e20565b94505060a089013567ffffffffffffffff81111561321757613216612dd2565b5b6132238b828c0161311d565b93505060c06132348b828c0161316e565b92505060e06132458b828c0161316e565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61328a81613255565b811461329557600080fd5b50565b6000813590506132a781613281565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff8211156132d2576132d1613020565b5b602082029050602081019050919050565b600080fd5b600681106132f557600080fd5b50565b600081359050613307816132e8565b92915050565b600061332061331b846132b7565b613080565b90508083825260208201905060208402830185811115613343576133426132e3565b5b835b8181101561336c578061335888826132f8565b845260208401935050602081019050613345565b5050509392505050565b600082601f83011261338b5761338a613005565b5b813561339b84826020860161330d565b91505092915050565b600067ffffffffffffffff8211156133bf576133be613020565b5b602082029050602081019050919050565b60006133e36133de846133a4565b613080565b90508083825260208201905060208402830185811115613406576134056132e3565b5b835b8181101561344d57803567ffffffffffffffff81111561342b5761342a613005565b5b808601613438898261311d565b85526020850194505050602081019050613408565b5050509392505050565b600082601f83011261346c5761346b613005565b5b813561347c8482602086016133d0565b91505092915050565b60006040828403121561349b5761349a6132ad565b5b6134a56040613080565b9050600082013567ffffffffffffffff8111156134c5576134c46132b2565b5b6134d184828501613376565b600083015250602082013567ffffffffffffffff8111156134f5576134f46132b2565b5b61350184828501613457565b60208301525092915050565b600080600080600060a0868803121561352957613528612dcd565b5b600061353788828901612e20565b955050602061354888828901612e20565b945050604061355988828901613298565b935050606086013567ffffffffffffffff81111561357a57613579612dd2565b5b61358688828901613485565b925050608061359788828901612e20565b9150509295509295909350565b6135ad81612e8e565b82525050565b60006020820190506135c860008301846135a4565b92915050565b600080fd5b60008083601f8401126135e9576135e8613005565b5b8235905067ffffffffffffffff811115613606576136056135ce565b5b602083019150836001820283011115613622576136216132e3565b5b9250929050565b600080fd5b60006040828403121561364457613643613629565b5b81905092915050565b60008060008060006080868803121561366957613668612dcd565b5b600061367788828901612e20565b955050602086013567ffffffffffffffff81111561369857613697612dd2565b5b6136a4888289016135d3565b9450945050604086013567ffffffffffffffff8111156136c7576136c6612dd2565b5b6136d38882890161362e565b92505060606136e488828901612e20565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b8381101561372b578082015181840152602081019050613710565b8381111561373a576000848401525b50505050565b600061374b826136f1565b61375581856136fc565b935061376581856020860161370d565b61376e8161300f565b840191505092915050565b600060208201905081810360008301526137938184613740565b905092915050565b60006137a682612dd7565b9050919050565b6137b68161379b565b82525050565b60006020820190506137d160008301846137ad565b92915050565b600080600080600080600060e0888a0312156137f6576137f5612dcd565b5b60006138048a828b01612e20565b97505060206138158a828b01612e20565b96505060406138268a828b01612f63565b95505060606138378a828b01612f63565b945050608088013567ffffffffffffffff81111561385857613857612dd2565b5b6138648a828b0161311d565b93505060a06138758a828b0161316e565b92505060c06138868a828b0161316e565b91505092959891949750929550565b60008083601f8401126138ab576138aa613005565b5b8235905067ffffffffffffffff8111156138c8576138c76135ce565b5b6020830191508360208202830111156138e4576138e36132e3565b5b9250929050565b60008083601f84011261390157613900613005565b5b8235905067ffffffffffffffff81111561391e5761391d6135ce565b5b60208301915083602082028301111561393a576139396132e3565b5b9250929050565b6000806000806040858703121561395b5761395a612dcd565b5b600085013567ffffffffffffffff81111561397957613978612dd2565b5b61398587828801613895565b9450945050602085013567ffffffffffffffff8111156139a8576139a7612dd2565b5b6139b4878288016138eb565b925092505092959194509250565b6000819050919050565b60006139e76139e26139dd84612dd7565b6139c2565b612dd7565b9050919050565b60006139f9826139cc565b9050919050565b6000613a0b826139ee565b9050919050565b613a1b81613a00565b82525050565b6000602082019050613a366000830184613a12565b92915050565b600060c08284031215613a5257613a51613629565b5b81905092915050565b6000806000806000806101608789031215613a7957613a78612dcd565b5b6000613a8789828a01612e20565b9650506020613a9889828a01612e20565b955050604087013567ffffffffffffffff811115613ab957613ab8612dd2565b5b613ac589828a0161311d565b945050606087013567ffffffffffffffff811115613ae657613ae5612dd2565b5b613af289828a0161362e565b9350506080613b0389828a01613a3c565b925050610140613b1589828a0161316e565b9150509295509295509295565b613b2b81612fcf565b82525050565b6000602082019050613b466000830184613b22565b92915050565b6000604082019050613b616000830185613b22565b613b6e6020830184612fa5565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b613b9a81613b75565b82525050565b6000604082019050613bb56000830185613b91565b613bc26020830184613b91565b9392505050565b600060208284031215613bdf57613bde612dcd565b5b6000613bed848285016132f8565b91505092915050565b600080600080600080600060e0888a031215613c1557613c14612dcd565b5b6000613c238a828b01612e20565b9750506020613c348a828b01612e20565b965050604088013567ffffffffffffffff811115613c5557613c54612dd2565b5b613c618a828b0161311d565b955050606088013567ffffffffffffffff811115613c8257613c81612dd2565b5b613c8e8a828b0161362e565b9450506080613c9f8a828b01612ff0565b93505060a0613cb08a828b01612e20565b92505060c0613cc18a828b0161316e565b91505092959891949750929550565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613d06600e836136fc565b9150613d1182613cd0565b602082019050919050565b60006020820190508181036000830152613d3581613cf9565b9050919050565b6000604082019050613d516000830185612fa5565b613d5e6020830184612fa5565b9392505050565b600081519050613d7481612fd9565b92915050565b600060208284031215613d9057613d8f612dcd565b5b6000613d9e84828501613d65565b91505092915050565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b6000613ddd6017836136fc565b9150613de882613da7565b602082019050919050565b60006020820190508181036000830152613e0c81613dd0565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b6000613e49601d836136fc565b9150613e5482613e13565b602082019050919050565b60006020820190508181036000830152613e7881613e3c565b9050919050565b613e888161314b565b82525050565b6000608082019050613ea360008301876135a4565b613eb06020830186613b22565b613ebd6040830185612fa5565b613eca6060830184613e7f565b95945050505050565b6000613edf3683613485565b9050919050565b6000606082019050613efb60008301866135a4565b613f0860208301856135a4565b613f156040830184613e7f565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613fb582612fcf565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613fe757613fe6613f7b565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261401e5761401d613ff2565b5b80840192508235915067ffffffffffffffff8211156140405761403f613ff7565b5b60208301925060208202360383131561405c5761405b613ffc565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600061408b82614064565b614095818561406f565b93506140a581856020860161370d565b6140ae8161300f565b840191505092915050565b600060608201905081810360008301526140d38186614080565b90506140e260208301856135a4565b6140ef6040830184613e7f565b949350505050565b600060808201905061410c6000830187613b22565b6141196020830186613b22565b6141266040830185613b22565b61413360608301846135a4565b95945050505050565b600081905092915050565b600061415282614064565b61415c818561413c565b935061416c81856020860161370d565b80840191505092915050565b60008160601b9050919050565b600061419082614178565b9050919050565b60006141a282614185565b9050919050565b6141ba6141b582612df7565b614197565b82525050565b60006141cc8285614147565b91506141d882846141a9565b6014820191508190509392505050565b60006040820190506141fd60008301856135a4565b61420a6020830184612fa5565b9392505050565b61421a81613255565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6006811061425d5761425c613f4c565b5b50565b600081905061426e8261424c565b919050565b600061427e82614260565b9050919050565b61428e81614273565b82525050565b60006142a08383614285565b60208301905092915050565b6000602082019050919050565b60006142c482614220565b6142ce818561422b565b93506142d98361423c565b8060005b8381101561430a5781516142f18882614294565b97506142fc836142ac565b9250506001810190506142dd565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061435f82614064565b6143698185614343565b935061437981856020860161370d565b6143828161300f565b840191505092915050565b60006143998383614354565b905092915050565b6000602082019050919050565b60006143b982614317565b6143c38185614322565b9350836020820285016143d585614333565b8060005b8581101561441157848403895281516143f2858261438d565b94506143fd836143a1565b925060208a019950506001810190506143d9565b50829750879550505050505092915050565b6000604083016000830151848203600086015261444082826142b9565b9150506020830151848203602086015261445a82826143ae565b9150508091505092915050565b600060a08201905061447c6000830188612fa5565b6144896020830187612fa5565b6144966040830186614211565b81810360608301526144a88185614423565b90506144b76080830184612fa5565b9695505050505050565b60006144cc82612fcf565b91506144d783612fcf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561450c5761450b613f7b565b5b828201905092915050565b6145208161379b565b811461452b57600080fd5b50565b60008151905061453d81614517565b92915050565b6000806040838503121561455a57614559612dcd565b5b60006145688582860161452e565b92505060206145798582860161452e565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b60006145df6023836136fc565b91506145ea82614583565b604082019050919050565b6000602082019050818103600083015261460e816145d2565b9050919050565b6000606082019050818103600083015261462f8186614080565b905081810360208301526146438185614423565b90506146526040830184612fa5565b949350505050565b6000602082840312156146705761466f612dcd565b5b600061467e8482850161452e565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b60006146e36023836136fc565b91506146ee82614687565b604082019050919050565b60006020820190508181036000830152614712816146d6565b9050919050565b60006147258284614147565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b600061478c6025836136fc565b915061479782614730565b604082019050919050565b600060208201905081810360008301526147bb8161477f565b9050919050565b600060a0820190506147d760008301886135a4565b6147e46020830187612fa5565b6147f16040830186612fa5565b81810360608301526148038185614080565b905081810360808301526148178184614080565b90509695505050505050565b600060808201905061483860008301876135a4565b6148456020830186612fa5565b6148526040830185612fa5565b81810360608301526148648184614080565b905095945050505050565b600061488261487d8461309b565b613080565b90508281526020810184848401111561489e5761489d61300a565b5b6148a984828561370d565b509392505050565b600082601f8301126148c6576148c5613005565b5b81516148d684826020860161486f565b91505092915050565b600080604083850312156148f6576148f5612dcd565b5b60006149048582860161452e565b925050602083015167ffffffffffffffff81111561492557614924612dd2565b5b614931858286016148b1565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061497582612fcf565b915061498083612fcf565b9250826149905761498f61493b565b5b828206905092915050565b600081905092915050565b60006149b1826136f1565b6149bb818561499b565b93506149cb81856020860161370d565b80840191505092915050565b60006149e382856149a6565b91506149ef82846149a6565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000614a31600f8361499b565b9150614a3c826149fb565b600f82019050919050565b6000614a5382846149a6565b9150614a5e82614a24565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000614a9f60148361499b565b9150614aaa82614a69565b601482019050919050565b6000614ac182846149a6565b9150614acc82614a92565b915081905092915050565b6000614ae282612fcf565b9150614aed83612fcf565b925082821015614b0057614aff613f7b565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b6000614b706020836136fc565b9150614b7b82614b3a565b602082019050919050565b60006020820190508181036000830152614b9f81614b63565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b6000614c02602a836136fc565b9150614c0d82614ba6565b604082019050919050565b60006020820190508181036000830152614c3181614bf5565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b6000614c946036836136fc565b9150614c9f82614c38565b604082019050919050565b60006020820190508181036000830152614cc381614c87565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b6000614d266029836136fc565b9150614d3182614cca565b604082019050919050565b60006020820190508181036000830152614d5581614d19565b905091905056fea264697066735822122082e06fb6af77cae25c51085ae06eb9e997eecee90f01f6af82302d2c6bf0c46164736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c806380381407116100c3578063b81cd8661161007c578063b81cd8661461039f578063cd2002f5146103d0578063cd3d4fb9146103ec578063ddca3f431461041c578063e1d173a91461043a578063ee8ca3b5146104565761014d565b806380381407146102de578063813785e6146102fa57806397d7577614610316578063abf26d5514610334578063ac21631a14610350578063b810c636146103805761014d565b80633323b467116101155780633323b4671461021a5780634e606c471461024a57806354fd4d5014610254578063573ea57514610272578063647846a5146102905780636d2dd29f146102ae5761014d565b80630407145c14610152578063272b1323146101825780632e6e0bd01461019e57806330a9fe6a146101ce5780633140576e146101ea575b600080fd5b61016c60048036038101906101679190612e35565b610472565b6040516101799190612f2a565b60405180910390f35b61019c60048036038101906101979190612e35565b6104c8565b005b6101b860048036038101906101b39190612f78565b6105d3565b6040516101c59190612fb4565b60405180910390f35b6101e860048036038101906101e39190613183565b610606565b005b61020460048036038101906101ff919061350d565b6107f3565b60405161021191906135b3565b60405180910390f35b610234600480360381019061022f919061364d565b61080d565b60405161024191906135b3565b60405180910390f35b61025261088a565b005b61025c610975565b6040516102699190613779565b60405180910390f35b61027a6109ae565b60405161028791906137bc565b60405180910390f35b6102986109d2565b6040516102a59190612fb4565b60405180910390f35b6102c860048036038101906102c39190612f78565b6109f8565b6040516102d59190612fb4565b60405180910390f35b6102f860048036038101906102f391906137d7565b610a2b565b005b610314600480360381019061030f9190613941565b610ba2565b005b61031e610d09565b60405161032b9190613a21565b60405180910390f35b61034e60048036038101906103499190613a5b565b610d21565b005b61036a60048036038101906103659190612f78565b610ff1565b6040516103779190613b31565b60405180910390f35b610388611009565b604051610396929190613b4c565b60405180910390f35b6103b960048036038101906103b49190612f78565b61103a565b6040516103c7929190613ba0565b60405180910390f35b6103ea60048036038101906103e59190612e35565b611096565b005b61040660048036038101906104019190613bc9565b6111a1565b6040516104139190612fb4565b60405180910390f35b6104246111d4565b6040516104319190613b31565b60405180910390f35b610454600480360381019061044f9190613bf6565b6111da565b005b610470600480360381019061046b9190612f78565b611465565b005b606060006104bd600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611483565b905080915050919050565b6104d0611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461053d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053490613d1c565b60405180910390fd5b73430000000000000000000000000000000000000273ffffffffffffffffffffffffffffffffffffffff1663954fa5ee30836040518363ffffffff1660e01b815260040161058c929190613d3c565b6020604051808303816000875af11580156105ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105cf9190613d7a565b5050565b60006020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068b90613df3565b60405180910390fd5b6106e586600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b610724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161071b90613e5f565b60405180910390fd5b8460038190555083600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600061077e878a8a87878760026114d8565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f668a2c70c9e33b13c143eac02a389bb5ff706c9939aab9ef9edbbc11216b7b4d878787846040516107e09493929190613e8e565b60405180910390a1505050505050505050565b600061080286868686866115df565b905095945050505050565b60008061081c3388600661161b565b809850819250505061087e818888888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508761087890613ed3565b876117f1565b91505095945050505050565b610892611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690613d1c565b60405180910390fd5b73430000000000000000000000000000000000000273ffffffffffffffffffffffffffffffffffffffff16634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561095b57600080fd5b505af115801561096f573d6000803e3d6000fd5b50505050565b6040518060400160405280600181526020017f370000000000000000000000000000000000000000000000000000000000000081525081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab090613df3565b60405180910390fd5b610b0a85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b610b49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4090613e5f565b60405180910390fd5b6000610b5b86898987878760026114d8565b90507f6bc93adab97dd835bee818087939b726558bc8d9177650a0018dd05eb00e56c8868683604051610b9093929190613ee6565b60405180910390a15050505050505050565b610baa611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0e90613d1c565b60405180910390fd5b600084849050905060005b81811015610d0157838382818110610c3d57610c3c613f1d565b5b9050602002016020810190610c529190612e35565b60066000888885818110610c6957610c68613f1d565b5b9050602002016020810190610c7e9190613bc9565b6005811115610c9057610c8f613f4c565b5b6005811115610ca257610ca1613f4c565b5b815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080610cf990613faa565b915050610c22565b505050505050565b73430000000000000000000000000000000000000281565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da690613df3565b60405180910390fd5b6000610dd08787610dbf8861196f565b87610dc990613ed3565b60006115df565b9050610e2381600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b610e62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5990613e5f565b60405180910390fd5b6000610ec382898989898060000190610e7b9190614001565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611ae8565b90508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff1660007fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a898686604051610f29939291906140b9565b60405180910390a4836020016020810190610f449190612e35565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16856000016020810190610f849190612e35565b73ffffffffffffffffffffffffffffffffffffffff167f116bfd46451bbd23e7a5f5b7420b28e3d98d4c477f173da513aaaeac3c4baada8760400135886060013589608001358a60a00135604051610fdf94939291906140f7565b60405180910390a45050505050505050565b60076020528060005260406000206000915090505481565b600080600354600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915091509091565b60056020528060005260406000206000915090508060000160009054906101000a90046fffffffffffffffffffffffffffffffff16908060000160109054906101000a90046fffffffffffffffffffffffffffffffff16905082565b61109e611498565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461110b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110290613d1c565b60405180910390fd5b73430000000000000000000000000000000000000273ffffffffffffffffffffffffffffffffffffffff1663662aa11d30836040518363ffffffff1660e01b815260040161115a929190613d3c565b6020604051808303816000875af1158015611179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119d9190613d7a565b5050565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611268576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125f90613df3565b60405180910390fd5b600061128888886112788961196f565b8861128290613ed3565b876115df565b90506112db81600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b61131a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131190613e5f565b60405180910390fd5b8360038190555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006113c3828a8a8a8a806000019061137b9190614001565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050886006611ae8565b9050600360009055600460006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690558773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16867fa458375b1282695a972870cbfbc4891a9d856b79d563d17667d171d87e0c527a8a8686604051611452939291906140b9565b60405180910390a4505050505050505050565b600061147382336006611b90565b905061147f8183611d4d565b5050565b606061149182600001611e6c565b9050919050565b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610354905090565b60006114d08360000183611ec8565b905092915050565b600061153e8686896040516020016114f19291906141c0565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611eeb565b508091505082156115d457611599888360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f8590919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b0988886040516115cb9291906141e8565b60405180910390a15b979650505050505050565b600085858585856040516020016115fa959493929190614467565b60405160208183030381529060405280519060200120905095945050505050565b6000806000600160058081111561163557611634613f4c565b5b61163f91906144c1565b905060005b818110156117e157600081600581111561166157611660613f4c565b5b905061167e81600581111561167957611678613f4c565b5b611f9c565b61168857506117ce565b60008660008360058111156116a05761169f613f4c565b5b60058111156116b2576116b1613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506116ec81611fdd565b60006376474e6a60e01b8a8a604051602401611709929190613d3c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006117aa83836040518060400160405280601881526020017f4175746f6d6174652e7072654372656174655461736b3a20000000000000000081525061204f565b915050808060200190518101906117c19190614543565b809b50819c505050505050505b80806117d990613faa565b915050611644565b5085859250925050935093915050565b600061180886866118018761196f565b86866115df565b905061185b81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b1561189b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611892906145f5565b60405180910390fd5b6118aa818787878760066120d9565b6118fb81600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206122aa90919063ffffffff16565b50808573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f73f079427211e7b93db86024054de0b3c4a076a36cf0f86d2c4bf0d112eb7f1d87878760405161195e93929190614615565b60405180910390a495945050505050565b600060188260038151811061198757611986613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c6010836002815181106119eb576119ea613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c600884600181518110611a4f57611a4e613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c84600081518110611ab157611ab0613f1d565b5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161717179050919050565b600080611af585846122c1565b9050611b058989898989866123fe565b8097508198505050611b7187878a604051602001611b249291906141c0565b6040516020818303038152906040526000876040518060400160405280600f81526020017f4175746f6d6174652e657865633a200000000000000000000000000000000000815250611eeb565b5080925050611b84898989898986612571565b50979650505050505050565b600080600580811115611ba657611ba5613f4c565b5b905060005b818111611d41576000816005811115611bc757611bc6613f4c565b5b9050611be4816005811115611bdf57611bde613f4c565b5b6126b7565b611bee5750611d2e565b6000856000836005811115611c0657611c05613f4c565b5b6005811115611c1857611c17613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611c5281611fdd565b60006314ae992660e01b8989604051602401611c6f9291906141e8565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000611d1083836040518060400160405280601881526020017f4175746f6d6174652e70726543616e63656c5461736b3a20000000000000000081525061204f565b91505080806020019051810190611d27919061465a565b9850505050505b8080611d3990613faa565b915050611bab565b50839150509392505050565b611d9e81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206114c190919063ffffffff16565b611ddd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd4906146f9565b60405180910390fd5b611e2e81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611f8590919063ffffffff16565b507f44d83729a43f9c6046446df014d073dd242e0ad672071e9b292f31b669c25b098183604051611e609291906141e8565b60405180910390a15050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611ebc57602002820191906000526020600020905b815481526020019060010190808311611ea8575b50505050509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051611f159190614719565b60006040518083038185875af1925050503d8060008114611f52576040519150601f19603f3d011682016040523d82523d6000602084013e611f57565b606091505b50809250819350505081158015611f6b5750835b15611f7b57611f7a81846126f8565b5b9550959350505050565b6000611f94836000018361285f565b905092915050565b600060026005811115611fb257611fb1613f4c565b5b826005811115611fc557611fc4613f4c565b5b03611fd35760019050611fd8565b600090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361204c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612043906147a2565b60405180910390fd5b50565b600060608473ffffffffffffffffffffffffffffffffffffffff16846040516120789190614719565b600060405180830381855af49150503d80600081146120b3576040519150601f19603f3d011682016040523d82523d6000602084013e6120b8565b606091505b508092508193505050816120d1576120d081846126f8565b5b935093915050565b600082600001515190506120f08360000151612973565b60005b818110156122a05760008460000151828151811061211457612113613f1d565b5b6020026020010151905061213981600581111561213457612133613f4c565b5b612c90565b612143575061228d565b600084600083600581111561215b5761215a613f4c565b5b600581111561216d5761216c613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506121a781611fdd565b600063b0ccbdf060e01b8b8b8b8b8b6020015189815181106121cc576121cb613f1d565b5b60200260200101516040516024016121e89594939291906147c2565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061228782826040518060400160405280601781526020017f4175746f6d6174652e6f6e4372656174655461736b3a2000000000000000000081525061204f565b50505050505b808061229890613faa565b9150506120f3565b5050505050505050565b60006122b98360000183612cd1565b905092915050565b606060008351905060008167ffffffffffffffff8111156122e5576122e4613020565b5b6040519080825280602002602001820160405280156123135781602001602082028036833780820191505090505b50905060005b828110156123f25784600087838151811061233757612336613f1d565b5b6020026020010151600581111561235157612350613f4c565b5b600581111561236357612362613f4c565b5b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106123a5576123a4613f1d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505080806123ea90613faa565b915050612319565b50809250505092915050565b6000606060008451905060005b8181101561255e5761244886828151811061242957612428613f1d565b5b6020026020010151600581111561244357612442613f4c565b5b612d41565b1561254b57600063c10304f760e01b8b8b8b8b60405160240161246e9493929190614823565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006125298784815181106124e5576124e4613f1d565b5b6020026020010151836040518060400160405280601681526020017f4175746f6d6174652e7072654578656343616c6c3a200000000000000000000081525061204f565b9150508080602001905181019061254091906148df565b809a50819b50505050505b808061255690613faa565b91505061240b565b5086869250925050965096945050505050565b60008151905060005b818110156126ad576125b784828151811061259857612597613f1d565b5b602002602001015160058111156125b2576125b1613f4c565b5b612d82565b1561269a57600063b2db0b4160e01b898989896040516024016125dd9493929190614823565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061269684838151811061265257612651613f1d565b5b6020026020010151826040518060400160405280601781526020017f4175746f6d6174652e706f73744578656343616c6c3a2000000000000000000081525061204f565b5050505b80806126a590613faa565b91505061257a565b5050505050505050565b6000600260058111156126cd576126cc613f4c565b5b8260058111156126e0576126df613f4c565b5b036126ee57600190506126f3565b600090505b919050565b600460208351612708919061496a565b03612803576000826020015190506308c379a060e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916036127a757604483019250818360405160200161275c9291906149d7565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279e9190613779565b60405180910390fd5b816040516020016127b89190614a47565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127fa9190613779565b60405180910390fd5b806040516020016128149190614ab5565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128569190613779565b60405180910390fd5b600080836001016000848152602001908152602001600020549050600081146129675760006001826128919190614ad7565b90506000600186600001805490506128a99190614ad7565b90508181146129185760008660000182815481106128ca576128c9613f1d565b5b90600052602060002001549050808760000184815481106128ee576128ed613f1d565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061292c5761292b614b0b565b5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061296d565b60009150505b92915050565b600081519050600060016005808111156129905761298f613f4c565b5b61299a91906144c1565b905060008167ffffffffffffffff8111156129b8576129b7613020565b5b6040519080825280602002602001820160405280156129e65781602001602082028036833780820191505090505b50905060005b83811015612b0a576000811115612aa45784600182612a0b9190614ad7565b81518110612a1c57612a1b613f1d565b5b60200260200101516005811115612a3657612a35613f4c565b5b858281518110612a4957612a48613f1d565b5b60200260200101516005811115612a6357612a62613f4c565b5b11612aa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9a90614b86565b60405180910390fd5b5b600182868381518110612aba57612ab9613f1d565b5b60200260200101516005811115612ad457612ad3613f4c565b5b81518110612ae557612ae4613f1d565b5b6020026020010190151590811515815250508080612b0290613faa565b9150506129ec565b508060016005811115612b2057612b1f613f4c565b5b81518110612b3157612b30613f1d565b5b602002602001015115612b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7090614c18565b60405180910390fd5b8060006005811115612b8e57612b8d613f4c565b5b81518110612b9f57612b9e613f1d565b5b60200260200101518015612bdd57508060046005811115612bc357612bc2613f4c565b5b81518110612bd457612bd3613f1d565b5b60200260200101515b15612c1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1490614caa565b60405180910390fd5b8060026005811115612c3257612c31613f4c565b5b81518110612c4357612c42613f1d565b5b6020026020010151612c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8190614d3c565b60405180910390fd5b50505050565b600060026005811115612ca657612ca5613f4c565b5b826005811115612cb957612cb8613f4c565b5b03612cc75760019050612ccc565b600090505b919050565b6000612cdd8383611ec8565b612d36578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612d3b565b600090505b92915050565b600060026005811115612d5757612d56613f4c565b5b826005811115612d6a57612d69613f4c565b5b03612d785760019050612d7d565b600090505b919050565b600060036005811115612d9857612d97613f4c565b5b826005811115612dab57612daa613f4c565b5b03612db95760019050612dbe565b600090505b919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612e0282612dd7565b9050919050565b612e1281612df7565b8114612e1d57600080fd5b50565b600081359050612e2f81612e09565b92915050565b600060208284031215612e4b57612e4a612dcd565b5b6000612e5984828501612e20565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000819050919050565b612ea181612e8e565b82525050565b6000612eb38383612e98565b60208301905092915050565b6000602082019050919050565b6000612ed782612e62565b612ee18185612e6d565b9350612eec83612e7e565b8060005b83811015612f1d578151612f048882612ea7565b9750612f0f83612ebf565b925050600181019050612ef0565b5085935050505092915050565b60006020820190508181036000830152612f448184612ecc565b905092915050565b612f5581612e8e565b8114612f6057600080fd5b50565b600081359050612f7281612f4c565b92915050565b600060208284031215612f8e57612f8d612dcd565b5b6000612f9c84828501612f63565b91505092915050565b612fae81612df7565b82525050565b6000602082019050612fc96000830184612fa5565b92915050565b6000819050919050565b612fe281612fcf565b8114612fed57600080fd5b50565b600081359050612fff81612fd9565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6130588261300f565b810181811067ffffffffffffffff8211171561307757613076613020565b5b80604052505050565b600061308a612dc3565b9050613096828261304f565b919050565b600067ffffffffffffffff8211156130b6576130b5613020565b5b6130bf8261300f565b9050602081019050919050565b82818337600083830152505050565b60006130ee6130e98461309b565b613080565b90508281526020810184848401111561310a5761310961300a565b5b6131158482856130cc565b509392505050565b600082601f83011261313257613131613005565b5b81356131428482602086016130db565b91505092915050565b60008115159050919050565b6131608161314b565b811461316b57600080fd5b50565b60008135905061317d81613157565b92915050565b600080600080600080600080610100898b0312156131a4576131a3612dcd565b5b60006131b28b828c01612e20565b98505060206131c38b828c01612e20565b97505060406131d48b828c01612f63565b96505060606131e58b828c01612ff0565b95505060806131f68b828c01612e20565b94505060a089013567ffffffffffffffff81111561321757613216612dd2565b5b6132238b828c0161311d565b93505060c06132348b828c0161316e565b92505060e06132458b828c0161316e565b9150509295985092959890939650565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61328a81613255565b811461329557600080fd5b50565b6000813590506132a781613281565b92915050565b600080fd5b600080fd5b600067ffffffffffffffff8211156132d2576132d1613020565b5b602082029050602081019050919050565b600080fd5b600681106132f557600080fd5b50565b600081359050613307816132e8565b92915050565b600061332061331b846132b7565b613080565b90508083825260208201905060208402830185811115613343576133426132e3565b5b835b8181101561336c578061335888826132f8565b845260208401935050602081019050613345565b5050509392505050565b600082601f83011261338b5761338a613005565b5b813561339b84826020860161330d565b91505092915050565b600067ffffffffffffffff8211156133bf576133be613020565b5b602082029050602081019050919050565b60006133e36133de846133a4565b613080565b90508083825260208201905060208402830185811115613406576134056132e3565b5b835b8181101561344d57803567ffffffffffffffff81111561342b5761342a613005565b5b808601613438898261311d565b85526020850194505050602081019050613408565b5050509392505050565b600082601f83011261346c5761346b613005565b5b813561347c8482602086016133d0565b91505092915050565b60006040828403121561349b5761349a6132ad565b5b6134a56040613080565b9050600082013567ffffffffffffffff8111156134c5576134c46132b2565b5b6134d184828501613376565b600083015250602082013567ffffffffffffffff8111156134f5576134f46132b2565b5b61350184828501613457565b60208301525092915050565b600080600080600060a0868803121561352957613528612dcd565b5b600061353788828901612e20565b955050602061354888828901612e20565b945050604061355988828901613298565b935050606086013567ffffffffffffffff81111561357a57613579612dd2565b5b61358688828901613485565b925050608061359788828901612e20565b9150509295509295909350565b6135ad81612e8e565b82525050565b60006020820190506135c860008301846135a4565b92915050565b600080fd5b60008083601f8401126135e9576135e8613005565b5b8235905067ffffffffffffffff811115613606576136056135ce565b5b602083019150836001820283011115613622576136216132e3565b5b9250929050565b600080fd5b60006040828403121561364457613643613629565b5b81905092915050565b60008060008060006080868803121561366957613668612dcd565b5b600061367788828901612e20565b955050602086013567ffffffffffffffff81111561369857613697612dd2565b5b6136a4888289016135d3565b9450945050604086013567ffffffffffffffff8111156136c7576136c6612dd2565b5b6136d38882890161362e565b92505060606136e488828901612e20565b9150509295509295909350565b600081519050919050565b600082825260208201905092915050565b60005b8381101561372b578082015181840152602081019050613710565b8381111561373a576000848401525b50505050565b600061374b826136f1565b61375581856136fc565b935061376581856020860161370d565b61376e8161300f565b840191505092915050565b600060208201905081810360008301526137938184613740565b905092915050565b60006137a682612dd7565b9050919050565b6137b68161379b565b82525050565b60006020820190506137d160008301846137ad565b92915050565b600080600080600080600060e0888a0312156137f6576137f5612dcd565b5b60006138048a828b01612e20565b97505060206138158a828b01612e20565b96505060406138268a828b01612f63565b95505060606138378a828b01612f63565b945050608088013567ffffffffffffffff81111561385857613857612dd2565b5b6138648a828b0161311d565b93505060a06138758a828b0161316e565b92505060c06138868a828b0161316e565b91505092959891949750929550565b60008083601f8401126138ab576138aa613005565b5b8235905067ffffffffffffffff8111156138c8576138c76135ce565b5b6020830191508360208202830111156138e4576138e36132e3565b5b9250929050565b60008083601f84011261390157613900613005565b5b8235905067ffffffffffffffff81111561391e5761391d6135ce565b5b60208301915083602082028301111561393a576139396132e3565b5b9250929050565b6000806000806040858703121561395b5761395a612dcd565b5b600085013567ffffffffffffffff81111561397957613978612dd2565b5b61398587828801613895565b9450945050602085013567ffffffffffffffff8111156139a8576139a7612dd2565b5b6139b4878288016138eb565b925092505092959194509250565b6000819050919050565b60006139e76139e26139dd84612dd7565b6139c2565b612dd7565b9050919050565b60006139f9826139cc565b9050919050565b6000613a0b826139ee565b9050919050565b613a1b81613a00565b82525050565b6000602082019050613a366000830184613a12565b92915050565b600060c08284031215613a5257613a51613629565b5b81905092915050565b6000806000806000806101608789031215613a7957613a78612dcd565b5b6000613a8789828a01612e20565b9650506020613a9889828a01612e20565b955050604087013567ffffffffffffffff811115613ab957613ab8612dd2565b5b613ac589828a0161311d565b945050606087013567ffffffffffffffff811115613ae657613ae5612dd2565b5b613af289828a0161362e565b9350506080613b0389828a01613a3c565b925050610140613b1589828a0161316e565b9150509295509295509295565b613b2b81612fcf565b82525050565b6000602082019050613b466000830184613b22565b92915050565b6000604082019050613b616000830185613b22565b613b6e6020830184612fa5565b9392505050565b60006fffffffffffffffffffffffffffffffff82169050919050565b613b9a81613b75565b82525050565b6000604082019050613bb56000830185613b91565b613bc26020830184613b91565b9392505050565b600060208284031215613bdf57613bde612dcd565b5b6000613bed848285016132f8565b91505092915050565b600080600080600080600060e0888a031215613c1557613c14612dcd565b5b6000613c238a828b01612e20565b9750506020613c348a828b01612e20565b965050604088013567ffffffffffffffff811115613c5557613c54612dd2565b5b613c618a828b0161311d565b955050606088013567ffffffffffffffff811115613c8257613c81612dd2565b5b613c8e8a828b0161362e565b9450506080613c9f8a828b01612ff0565b93505060a0613cb08a828b01612e20565b92505060c0613cc18a828b0161316e565b91505092959891949750929550565b7f4e4f545f415554484f52495a4544000000000000000000000000000000000000600082015250565b6000613d06600e836136fc565b9150613d1182613cd0565b602082019050919050565b60006020820190508181036000830152613d3581613cf9565b9050919050565b6000604082019050613d516000830185612fa5565b613d5e6020830184612fa5565b9392505050565b600081519050613d7481612fd9565b92915050565b600060208284031215613d9057613d8f612dcd565b5b6000613d9e84828501613d65565b91505092915050565b7f47656c61746f666965643a204f6e6c792067656c61746f000000000000000000600082015250565b6000613ddd6017836136fc565b9150613de882613da7565b602082019050919050565b60006020820190508181036000830152613e0c81613dd0565b9050919050565b7f4175746f6d6174652e657865633a205461736b206e6f7420666f756e64000000600082015250565b6000613e49601d836136fc565b9150613e5482613e13565b602082019050919050565b60006020820190508181036000830152613e7881613e3c565b9050919050565b613e888161314b565b82525050565b6000608082019050613ea360008301876135a4565b613eb06020830186613b22565b613ebd6040830185612fa5565b613eca6060830184613e7f565b95945050505050565b6000613edf3683613485565b9050919050565b6000606082019050613efb60008301866135a4565b613f0860208301856135a4565b613f156040830184613e7f565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613fb582612fcf565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613fe757613fe6613f7b565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261401e5761401d613ff2565b5b80840192508235915067ffffffffffffffff8211156140405761403f613ff7565b5b60208301925060208202360383131561405c5761405b613ffc565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600061408b82614064565b614095818561406f565b93506140a581856020860161370d565b6140ae8161300f565b840191505092915050565b600060608201905081810360008301526140d38186614080565b90506140e260208301856135a4565b6140ef6040830184613e7f565b949350505050565b600060808201905061410c6000830187613b22565b6141196020830186613b22565b6141266040830185613b22565b61413360608301846135a4565b95945050505050565b600081905092915050565b600061415282614064565b61415c818561413c565b935061416c81856020860161370d565b80840191505092915050565b60008160601b9050919050565b600061419082614178565b9050919050565b60006141a282614185565b9050919050565b6141ba6141b582612df7565b614197565b82525050565b60006141cc8285614147565b91506141d882846141a9565b6014820191508190509392505050565b60006040820190506141fd60008301856135a4565b61420a6020830184612fa5565b9392505050565b61421a81613255565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6006811061425d5761425c613f4c565b5b50565b600081905061426e8261424c565b919050565b600061427e82614260565b9050919050565b61428e81614273565b82525050565b60006142a08383614285565b60208301905092915050565b6000602082019050919050565b60006142c482614220565b6142ce818561422b565b93506142d98361423c565b8060005b8381101561430a5781516142f18882614294565b97506142fc836142ac565b9250506001810190506142dd565b5085935050505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b600082825260208201905092915050565b600061435f82614064565b6143698185614343565b935061437981856020860161370d565b6143828161300f565b840191505092915050565b60006143998383614354565b905092915050565b6000602082019050919050565b60006143b982614317565b6143c38185614322565b9350836020820285016143d585614333565b8060005b8581101561441157848403895281516143f2858261438d565b94506143fd836143a1565b925060208a019950506001810190506143d9565b50829750879550505050505092915050565b6000604083016000830151848203600086015261444082826142b9565b9150506020830151848203602086015261445a82826143ae565b9150508091505092915050565b600060a08201905061447c6000830188612fa5565b6144896020830187612fa5565b6144966040830186614211565b81810360608301526144a88185614423565b90506144b76080830184612fa5565b9695505050505050565b60006144cc82612fcf565b91506144d783612fcf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561450c5761450b613f7b565b5b828201905092915050565b6145208161379b565b811461452b57600080fd5b50565b60008151905061453d81614517565b92915050565b6000806040838503121561455a57614559612dcd565b5b60006145688582860161452e565b92505060206145798582860161452e565b9150509250929050565b7f4175746f6d6174652e6372656174655461736b3a204475706c6963617465207460008201527f61736b0000000000000000000000000000000000000000000000000000000000602082015250565b60006145df6023836136fc565b91506145ea82614583565b604082019050919050565b6000602082019050818103600083015261460e816145d2565b9050919050565b6000606082019050818103600083015261462f8186614080565b905081810360208301526146438185614423565b90506146526040830184612fa5565b949350505050565b6000602082840312156146705761466f612dcd565b5b600061467e8482850161452e565b91505092915050565b7f4175746f6d6174652e63616e63656c5461736b3a205461736b206e6f7420666f60008201527f756e640000000000000000000000000000000000000000000000000000000000602082015250565b60006146e36023836136fc565b91506146ee82614687565b604082019050919050565b60006020820190508181036000830152614712816146d6565b9050919050565b60006147258284614147565b915081905092915050565b7f4175746f6d6174652e5f6d6f64756c65496e697469616c697365643a204e6f7460008201527f20696e6974000000000000000000000000000000000000000000000000000000602082015250565b600061478c6025836136fc565b915061479782614730565b604082019050919050565b600060208201905081810360008301526147bb8161477f565b9050919050565b600060a0820190506147d760008301886135a4565b6147e46020830187612fa5565b6147f16040830186612fa5565b81810360608301526148038185614080565b905081810360808301526148178184614080565b90509695505050505050565b600060808201905061483860008301876135a4565b6148456020830186612fa5565b6148526040830185612fa5565b81810360608301526148648184614080565b905095945050505050565b600061488261487d8461309b565b613080565b90508281526020810184848401111561489e5761489d61300a565b5b6148a984828561370d565b509392505050565b600082601f8301126148c6576148c5613005565b5b81516148d684826020860161486f565b91505092915050565b600080604083850312156148f6576148f5612dcd565b5b60006149048582860161452e565b925050602083015167ffffffffffffffff81111561492557614924612dd2565b5b614931858286016148b1565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061497582612fcf565b915061498083612fcf565b9250826149905761498f61493b565b5b828206905092915050565b600081905092915050565b60006149b1826136f1565b6149bb818561499b565b93506149cb81856020860161370d565b80840191505092915050565b60006149e382856149a6565b91506149ef82846149a6565b91508190509392505050565b7f4e6f4572726f7253656c6563746f720000000000000000000000000000000000600082015250565b6000614a31600f8361499b565b9150614a3c826149fb565b600f82019050919050565b6000614a5382846149a6565b9150614a5e82614a24565b915081905092915050565b7f556e657870656374656452657475726e64617461000000000000000000000000600082015250565b6000614a9f60148361499b565b9150614aaa82614a69565b601482019050919050565b6000614ac182846149a6565b9150614acc82614a92565b915081905092915050565b6000614ae282612fcf565b9150614aed83612fcf565b925082821015614b0057614aff613f7b565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4175746f6d6174652e5f76616c69644d6f64756c65733a20417363206f6e6c79600082015250565b6000614b706020836136fc565b9150614b7b82614b3a565b602082019050919050565b60006020820190508181036000830152614b9f81614b63565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2054494d452069732060008201527f6465707265636174656400000000000000000000000000000000000000000000602082015250565b6000614c02602a836136fc565b9150614c0d82614ba6565b604082019050919050565b60006020820190508181036000830152614c3181614bf5565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a204f6e6c792052455360008201527f4f4c564552206f7220574542335f46554e4354494f4e00000000000000000000602082015250565b6000614c946036836136fc565b9150614c9f82614c38565b604082019050919050565b60006020820190508181036000830152614cc381614c87565b9050919050565b7f4175746f6d6174652e5f76616c69644d6f64756c65733a2050524f585920697360008201527f2072657175697265640000000000000000000000000000000000000000000000602082015250565b6000614d266029836136fc565b9150614d3182614cca565b604082019050919050565b60006020820190508181036000830152614d5581614d19565b905091905056fea264697066735822122082e06fb6af77cae25c51085ae06eb9e997eecee90f01f6af82302d2c6bf0c46164736f6c634300080e0033", "devdoc": { "kind": "dev", "methods": { @@ -943,4 +991,4 @@ } } } -} +} \ No newline at end of file diff --git a/deployments/blast/solcInputs/a453e7a18519fd07c1a882fb1953995f.json b/deployments/blast/solcInputs/a453e7a18519fd07c1a882fb1953995f.json new file mode 100644 index 0000000..de613cb --- /dev/null +++ b/deployments/blast/solcInputs/a453e7a18519fd07c1a882fb1953995f.json @@ -0,0 +1,227 @@ +{ + "language": "Solidity", + "sources": { + "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 {BlastGasFees} from \"./vendor/blast/BlastGasFees.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, BlastGasFees, 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" + }, + "@openzeppelin/contracts/utils/structs/EnumerableSet.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\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 * ```\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 */\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 return _values(set._inner);\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 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 on 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 assembly {\n result := store\n }\n\n return result;\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/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/blast/BlastGasFees.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.14;\n\nimport {Proxied} from \"../proxy/EIP173/Proxied.sol\";\nimport {IBlast} from \"./interfaces/IBlast.sol\";\n\ncontract BlastGasFees is Proxied {\n IBlast public constant BLAST =\n IBlast(0x4300000000000000000000000000000000000002);\n\n function configureClaimableGas() external onlyProxyAdmin {\n BLAST.configureClaimableGas();\n }\n\n function claimAllGas(address _recipient) external onlyProxyAdmin {\n BLAST.claimAllGas(address(this), _recipient);\n }\n\n function claimMaxGas(address _recipient) external onlyProxyAdmin {\n BLAST.claimMaxGas(address(this), _recipient);\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/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/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/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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.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 function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) 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(\n IERC20 token,\n address spender,\n uint256 value\n ) 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 function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\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 if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\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" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.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 IERC20 {\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(\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(address indexed owner, address indexed spender, uint256 value);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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 *\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\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/blast/interfaces/IBlast.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\nenum YieldMode {\n AUTOMATIC,\n VOID,\n CLAIMABLE\n}\n\nenum GasMode {\n VOID,\n CLAIMABLE\n}\n\ninterface IBlast {\n // configure\n function configureContract(\n address contractAddress,\n YieldMode _yield,\n GasMode gasMode,\n address governor\n ) external;\n\n function configure(\n YieldMode _yield,\n GasMode gasMode,\n address governor\n ) external;\n\n // base configuration options\n function configureClaimableYield() external;\n\n function configureClaimableYieldOnBehalf(address contractAddress) external;\n\n function configureAutomaticYield() external;\n\n function configureAutomaticYieldOnBehalf(address contractAddress) external;\n\n function configureVoidYield() external;\n\n function configureVoidYieldOnBehalf(address contractAddress) external;\n\n function configureClaimableGas() external;\n\n function configureClaimableGasOnBehalf(address contractAddress) external;\n\n function configureVoidGas() external;\n\n function configureVoidGasOnBehalf(address contractAddress) external;\n\n function configureGovernor(address _governor) external;\n\n function configureGovernorOnBehalf(\n address _newGovernor,\n address contractAddress\n ) external;\n\n // claim yield\n function claimYield(\n address contractAddress,\n address recipientOfYield,\n uint256 amount\n ) external returns (uint256);\n\n function claimAllYield(address contractAddress, address recipientOfYield)\n external\n returns (uint256);\n\n // claim gas\n function claimAllGas(address contractAddress, address recipientOfGas)\n external\n returns (uint256);\n\n function claimGasAtMinClaimRate(\n address contractAddress,\n address recipientOfGas,\n uint256 minClaimRateBips\n ) external returns (uint256);\n\n function claimMaxGas(address contractAddress, address recipientOfGas)\n external\n returns (uint256);\n\n function claimGas(\n address contractAddress,\n address recipientOfGas,\n uint256 gasToClaim,\n uint256 gasSecondsToConsume\n ) external returns (uint256);\n\n // read functions\n function readClaimableYield(address contractAddress)\n external\n view\n returns (uint256);\n\n function readYieldConfiguration(address contractAddress)\n external\n view\n returns (uint8);\n\n function readGasParams(address contractAddress)\n external\n view\n returns (\n uint256 etherSeconds,\n uint256 etherBalance,\n uint256 lastUpdated,\n GasMode\n );\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/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/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/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/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/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/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/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/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/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/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" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\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 a proxied contract can't have 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 * 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 initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool 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 Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !AddressUpgradeable.isContract(address(this));\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" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\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 */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\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" + }, + "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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (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 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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing 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/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (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" + } + }, + "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