diff --git a/environments/local.toml b/environments/local.toml index 6165549..6dc6739 100644 --- a/environments/local.toml +++ b/environments/local.toml @@ -13,7 +13,7 @@ # CAUTION: Disable only if state creation is not desired or can be filled subsequently enableState = true - subgraphPath = "~/gelatodigital/gelato-subgraph/build" + subgraphPath = "./subgraph" # Interval to restart wasm instance periodically wasmRestartBlocksInterval = 20 diff --git a/subgraph/Contract/Contract.wasm b/subgraph/Contract/Contract.wasm new file mode 100644 index 0000000..0cb456e Binary files /dev/null and b/subgraph/Contract/Contract.wasm differ diff --git a/subgraph/Contract/abis/Contract.json b/subgraph/Contract/abis/Contract.json new file mode 100644 index 0000000..ffc4243 --- /dev/null +++ b/subgraph/Contract/abis/Contract.json @@ -0,0 +1,3530 @@ +[ + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "gelatoGasPriceOracle", + "type": "address" + }, + { + "internalType": "bytes", + "name": "oracleRequestData", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "gelatoMaxGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "internalGasRequirement", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minExecutorStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executorSuccessShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sysAdminSuccessShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalSuccessShare", + "type": "uint256" + } + ], + "internalType": "struct IGelatoSysAdmin.GelatoSysAdminInitialState", + "name": "_", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "taskReceiptId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "LogCanExecFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "taskReceiptId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "executorRefund", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "LogExecReverted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "taskReceiptId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "executorSuccessFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sysAdminSuccessFee", + "type": "uint256" + } + ], + "name": "LogExecSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldExecutor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newExecutor", + "type": "address" + } + ], + "name": "LogExecutorAssignedExecutor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + } + ], + "name": "LogExecutorBalanceWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldStake", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newStake", + "type": "uint256" + } + ], + "name": "LogExecutorStaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "LogExecutorSuccessShareSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "executor", + "type": "address" + } + ], + "name": "LogExecutorUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newProviderFunds", + "type": "uint256" + } + ], + "name": "LogFundsProvided", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "realWithdrawAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newProviderFunds", + "type": "uint256" + } + ], + "name": "LogFundsUnprovided", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "LogGelatoGasPriceOracleSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxGas", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMaxGas", + "type": "uint256" + } + ], + "name": "LogGelatoMaxGasSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldRequirment", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRequirment", + "type": "uint256" + } + ], + "name": "LogInternalGasRequirementSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMin", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMin", + "type": "uint256" + } + ], + "name": "LogMinExecutorStakeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "oldData", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "newData", + "type": "bytes" + } + ], + "name": "LogOracleRequestDataSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldExecutor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newExecutor", + "type": "address" + } + ], + "name": "LogProviderAssignedExecutor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "name": "LogProviderModuleAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "name": "LogProviderModuleRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "LogSysAdminFundsWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newShare", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "total", + "type": "uint256" + } + ], + "name": "LogSysAdminSuccessShareSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "taskReceiptId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "cancellor", + "type": "address" + } + ], + "name": "LogTaskCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "taskSpecHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldTaskSpecGasPriceCeil", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTaskSpecGasPriceCeil", + "type": "uint256" + } + ], + "name": "LogTaskSpecGasPriceCeilSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "taskSpecHash", + "type": "bytes32" + } + ], + "name": "LogTaskSpecProvided", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "taskSpecHash", + "type": "bytes32" + } + ], + "name": "LogTaskSpecUnprovided", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "taskReceiptId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "taskReceiptHash", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct TaskReceipt", + "name": "taskReceipt", + "type": "tuple" + } + ], + "name": "LogTaskSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "EXEC_TX_OVERHEAD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_CEIL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGelatoProviderModule[]", + "name": "_modules", + "type": "address[]" + } + ], + "name": "addProviderModules", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "internalType": "struct TaskReceipt", + "name": "_TR", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gelatoGasPrice", + "type": "uint256" + } + ], + "name": "canExec", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task", + "name": "_task", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_expiryDate", + "type": "uint256" + } + ], + "name": "canSubmitTask", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "internalType": "struct TaskReceipt", + "name": "_TR", + "type": "tuple" + } + ], + "name": "cancelTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currentTaskReceiptId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "internalType": "struct TaskReceipt", + "name": "_TR", + "type": "tuple" + } + ], + "name": "exec", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "internalType": "struct TaskReceipt", + "name": "taskReceipt", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gelatoGasPrice", + "type": "uint256" + } + ], + "name": "executionWrapper", + "outputs": [ + { + "internalType": "enum GelatoCore.ExecutionResult", + "name": "", + "type": "uint8" + }, + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "internalType": "address", + "name": "_newExecutor", + "type": "address" + } + ], + "name": "executorAssignsExecutor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "executorByProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "executorProvidersCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "executorStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gasPrice", + "type": "uint256" + } + ], + "name": "executorSuccessFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "executorSuccessShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelatoGasPriceOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gelatoMaxGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "internalType": "struct TaskReceipt", + "name": "_TR", + "type": "tuple" + } + ], + "name": "hashTaskReceipt", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition[]", + "name": "conditions", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "gasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct TaskSpec", + "name": "_taskSpec", + "type": "tuple" + } + ], + "name": "hashTaskSpec", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "internalGasRequirement", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_executor", + "type": "address" + } + ], + "name": "isExecutorAssigned", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_executor", + "type": "address" + } + ], + "name": "isExecutorMinStaked", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "_module", + "type": "address" + } + ], + "name": "isModuleProvided", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gelatoMaxGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gelatoGasPrice", + "type": "uint256" + } + ], + "name": "isProviderLiquid", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task", + "name": "_task", + "type": "tuple" + } + ], + "name": "isTaskProvided", + "outputs": [ + { + "internalType": "string", + "name": "res", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_provider", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IGelatoCondition[]", + "name": "conditions", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "gasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct TaskSpec", + "name": "_taskSpec", + "type": "tuple" + } + ], + "name": "isTaskSpecProvided", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_gelatoMaxGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gelatoGasPrice", + "type": "uint256" + } + ], + "name": "minExecProviderFunds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minExecutorStake", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "address", + "name": "userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "provider", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cycleId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "submissionsLeft", + "type": "uint256" + } + ], + "internalType": "struct TaskReceipt[]", + "name": "_taskReceipts", + "type": "tuple[]" + } + ], + "name": "multiCancelTasks", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_executor", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract IGelatoCondition[]", + "name": "conditions", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "gasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct TaskSpec[]", + "name": "_taskSpecs", + "type": "tuple[]" + }, + { + "internalType": "contract IGelatoProviderModule[]", + "name": "_modules", + "type": "address[]" + } + ], + "name": "multiProvide", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_providers", + "type": "address[]" + }, + { + "internalType": "address", + "name": "_newExecutor", + "type": "address" + } + ], + "name": "multiReassignProviders", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawAmount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "contract IGelatoCondition[]", + "name": "conditions", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "gasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct TaskSpec[]", + "name": "_taskSpecs", + "type": "tuple[]" + }, + { + "internalType": "contract IGelatoProviderModule[]", + "name": "_modules", + "type": "address[]" + } + ], + "name": "multiUnprovide", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "oracleRequestData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_provider", + "type": "address" + } + ], + "name": "provideFunds", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition[]", + "name": "conditions", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "gasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct TaskSpec[]", + "name": "_taskSpecs", + "type": "tuple[]" + } + ], + "name": "provideTaskSpecs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newExecutor", + "type": "address" + } + ], + "name": "providerAssignsExecutor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task", + "name": "_task", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_gelatoGasPrice", + "type": "uint256" + } + ], + "name": "providerCanExec", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "providerFunds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_userProxy", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task", + "name": "_task", + "type": "tuple" + } + ], + "name": "providerModuleChecks", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_provider", + "type": "address" + } + ], + "name": "providerModules", + "outputs": [ + { + "internalType": "contract IGelatoProviderModule[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IGelatoProviderModule[]", + "name": "_modules", + "type": "address[]" + } + ], + "name": "removeProviderModules", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setExecutorSuccessShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOracle", + "type": "address" + } + ], + "name": "setGelatoGasPriceOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newMaxGas", + "type": "uint256" + } + ], + "name": "setGelatoMaxGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newRequirement", + "type": "uint256" + } + ], + "name": "setInternalGasRequirement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newMin", + "type": "uint256" + } + ], + "name": "setMinExecutorStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_requestData", + "type": "bytes" + } + ], + "name": "setOracleRequestData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_percentage", + "type": "uint256" + } + ], + "name": "setSysAdminSuccessShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskSpecHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_gasPriceCeil", + "type": "uint256" + } + ], + "name": "setTaskSpecGasPriceCeil", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakeExecutor", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task", + "name": "_task", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_expiryDate", + "type": "uint256" + } + ], + "name": "submitTask", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "_tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "_expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_sumOfRequestedTaskSubmits", + "type": "uint256" + } + ], + "name": "submitTaskChain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "contract IGelatoProviderModule", + "name": "module", + "type": "address" + } + ], + "internalType": "struct Provider", + "name": "_provider", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition", + "name": "inst", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Condition[]", + "name": "conditions", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "selfProviderGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "selfProviderGasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct Task[]", + "name": "_tasks", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "_expiryDate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cycles", + "type": "uint256" + } + ], + "name": "submitTaskCycle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sysAdminFunds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_gasPrice", + "type": "uint256" + } + ], + "name": "sysAdminSuccessFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sysAdminSuccessShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "taskReceiptHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "taskSpecGasPriceCeil", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSuccessShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawAmount", + "type": "uint256" + } + ], + "name": "unprovideFunds", + "outputs": [ + { + "internalType": "uint256", + "name": "realWithdrawAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "contract IGelatoCondition[]", + "name": "conditions", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum Operation", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "enum DataFlow", + "name": "dataFlow", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "termsOkCheck", + "type": "bool" + } + ], + "internalType": "struct Action[]", + "name": "actions", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "gasPriceCeil", + "type": "uint256" + } + ], + "internalType": "struct TaskSpec[]", + "name": "_taskSpecs", + "type": "tuple[]" + } + ], + "name": "unprovideTaskSpecs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unstakeExecutor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawAmount", + "type": "uint256" + } + ], + "name": "withdrawExcessExecutorStake", + "outputs": [ + { + "internalType": "uint256", + "name": "realWithdrawAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "withdrawSysAdminFunds", + "outputs": [ + { + "internalType": "uint256", + "name": "realWithdrawAmount", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/subgraph/schema.graphql b/subgraph/schema.graphql new file mode 100644 index 0000000..e304537 --- /dev/null +++ b/subgraph/schema.graphql @@ -0,0 +1,92 @@ +type User @entity { + id: ID! + address: Bytes! + # taskReceiptWrappers: [TaskReceiptWrapper!] + signUpDate: BigInt! + executor: Bytes +} + +type TaskReceiptWrapper @entity { + id: ID! + user: User! + taskReceipt: TaskReceipt! + submissionHash: Bytes! + status: TaskReceiptStatus! + submissionDate: BigInt! + selectedExecutor: Bytes! + executionDate: BigInt + executionHash: Bytes + selfProvided: Boolean! +} + +enum TaskReceiptStatus { + awaitingExec + execSuccess + execReverted + canceled + expired +} + +type TaskReceipt @entity { + id: ID! + userProxy: Bytes! + provider: Provider! + index: BigInt! + tasks: [Task!] + expiryDate: BigInt! + cycleId: BigInt! + submissionsLeft: BigInt! +} + +type TaskCycle @entity { + id: ID! + taskReceiptWrappers: [TaskReceiptWrapper!]! +} + +type Task @entity { + id: ID! + conditions: [Condition!] + actions: [Action!] + selfProviderGasLimit: BigInt! + selfProviderGasPriceCeil: BigInt! +} + +type Provider @entity { + id: ID! + addr: Bytes! + module: Bytes! + taskCount: BigInt! +} + +type Condition @entity { + id: ID! + inst: Bytes! + data: Bytes! +} + +type Action @entity { + id: ID! + addr: Bytes! + data: Bytes! + operation: BigInt! + dataFlow: BigInt! + value: BigInt! + termsOkCheck: Boolean! +} + +type Executor @entity { + id: ID! + addr: Bytes! +} + +enum Operation { + Call + Delegatecall +} + +enum DataFlow { + None + In + Out + InAndOut +} diff --git a/subgraph/subgraph.yaml b/subgraph/subgraph.yaml new file mode 100644 index 0000000..970eb32 --- /dev/null +++ b/subgraph/subgraph.yaml @@ -0,0 +1,101 @@ +specVersion: 0.0.2 +description: Ethereum's Automation Protocol on Mainnet +schema: + file: schema.graphql +dataSources: + - kind: ethereum/contract + name: Contract + network: mainnet + source: + address: "0x025030bdaa159f281cae63873e68313a703725a5" + abi: Contract + startBlock: 11361987 + mapping: + kind: ethereum/events + apiVersion: 0.0.5 + language: wasm/assemblyscript + entities: + - LogCanExecFailed + - LogExecReverted + - LogExecSuccess + - LogExecutorAssignedExecutor + - LogExecutorBalanceWithdrawn + - LogExecutorStaked + - LogExecutorSuccessShareSet + - LogExecutorUnstaked + - LogFundsProvided + - LogFundsUnprovided + - LogGelatoGasPriceOracleSet + - LogGelatoMaxGasSet + - LogInternalGasRequirementSet + - LogMinExecutorStakeSet + - LogOracleRequestDataSet + - LogProviderAssignedExecutor + - LogProviderModuleAdded + - LogProviderModuleRemoved + - LogSysAdminFundsWithdrawn + - LogSysAdminSuccessShareSet + - LogTaskCancelled + - LogTaskSpecGasPriceCeilSet + - LogTaskSpecProvided + - LogTaskSpecUnprovided + - LogTaskSubmitted + - OwnershipTransferred + abis: + - name: Contract + file: Contract/abis/Contract.json + eventHandlers: + - event: LogCanExecFailed(indexed address,indexed uint256,string) + handler: handleLogCanExecFailed + - event: LogExecReverted(indexed address,indexed uint256,uint256,string) + handler: handleLogExecReverted + - event: LogExecSuccess(indexed address,indexed uint256,uint256,uint256) + handler: handleLogExecSuccess + - event: LogExecutorAssignedExecutor(indexed address,indexed address,indexed address) + handler: handleLogExecutorAssignedExecutor + - event: LogExecutorBalanceWithdrawn(indexed address,uint256) + handler: handleLogExecutorBalanceWithdrawn + - event: LogExecutorStaked(indexed address,uint256,uint256) + handler: handleLogExecutorStaked + - event: LogExecutorSuccessShareSet(uint256,uint256,uint256) + handler: handleLogExecutorSuccessShareSet + - event: LogExecutorUnstaked(indexed address) + handler: handleLogExecutorUnstaked + - event: LogFundsProvided(indexed address,uint256,uint256) + handler: handleLogFundsProvided + - event: LogFundsUnprovided(indexed address,uint256,uint256) + handler: handleLogFundsUnprovided + - event: LogGelatoGasPriceOracleSet(indexed address,indexed address) + handler: handleLogGelatoGasPriceOracleSet + - event: LogGelatoMaxGasSet(uint256,uint256) + handler: handleLogGelatoMaxGasSet + - event: LogInternalGasRequirementSet(uint256,uint256) + handler: handleLogInternalGasRequirementSet + - event: LogMinExecutorStakeSet(uint256,uint256) + handler: handleLogMinExecutorStakeSet + - event: LogOracleRequestDataSet(bytes,bytes) + handler: handleLogOracleRequestDataSet + - event: LogProviderAssignedExecutor(indexed address,indexed address,indexed address) + handler: handleLogProviderAssignedExecutor + - event: LogProviderModuleAdded(indexed address,indexed address) + handler: handleLogProviderModuleAdded + - event: LogProviderModuleRemoved(indexed address,indexed address) + handler: handleLogProviderModuleRemoved + - event: LogSysAdminFundsWithdrawn(uint256,uint256) + handler: handleLogSysAdminFundsWithdrawn + - event: LogSysAdminSuccessShareSet(uint256,uint256,uint256) + handler: handleLogSysAdminSuccessShareSet + - event: LogTaskCancelled(indexed uint256,indexed address) + handler: handleLogTaskCancelled + - event: LogTaskSpecGasPriceCeilSet(indexed address,bytes32,uint256,uint256) + handler: handleLogTaskSpecGasPriceCeilSet + - event: LogTaskSpecProvided(indexed address,indexed bytes32) + handler: handleLogTaskSpecProvided + - event: LogTaskSpecUnprovided(indexed address,indexed bytes32) + handler: handleLogTaskSpecUnprovided + - event: LogTaskSubmitted(indexed uint256,indexed + bytes32,(uint256,address,(address,address),uint256,((address,bytes)[],(address,bytes,uint8,uint8,uint256,bool)[],uint256,uint256)[],uint256,uint256,uint256)) + handler: handleLogTaskSubmitted + - event: OwnershipTransferred(indexed address,indexed address) + handler: handleOwnershipTransferred + file: Contract/Contract.wasm