UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

512 lines 30.4 kB
{ "contractName": "IChainlinkAutomation", "abi": [ { "constant": false, "inputs": [ { "internalType": "bytes", "name": "_checkData", "type": "bytes" } ], "name": "checkUpkeep", "outputs": [ { "internalType": "bool", "name": "upkeepNeeded", "type": "bool" }, { "internalType": "bytes", "name": "performData", "type": "bytes" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "bytes", "name": "_performData", "type": "bytes" } ], "name": "performUpkeep", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_checkData\",\"type\":\"bytes\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"upkeepNeeded\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Dolomite\",\"details\":\"Chainlink Automation enables conditional execution of your smart contracts functions through a hyper-reliable and decentralized automation platform that uses the same external network of node operators that secures billions in value. The documentation is copied from Chainlink's official smart contract documentation\",\"methods\":{\"checkUpkeep(bytes)\":{\"details\":\"To ensure that it is never called, you may want to add the `cannotExecute` modifier from `KeeperBase` to your implementation of this method.\",\"params\":{\"_checkData\":\"specified in the upkeep registration so it is always the same for a registered upkeep. This can easily be broken down into specific arguments using `abi.decode`, so multiple up-keeps can be registered on the same contract and easily differentiated by the contract.\"},\"return\":\"upkeepNeeded A boolean to indicate whether the keeper should call `performUpkeep` or not.performData The bytes that the keeper should call `performUpkeep` with, if upkeep is needed. If you would like to encode data to decode later, try `abi.encode`.\"},\"performUpkeep(bytes)\":{\"details\":\"The input to this method should not be trusted, and the caller of the method should not even be restricted to any single registry. Anyone should be able call it, and the input should be validated, there is no guarantee that the data passed in is the _performData returned from checkUpkeep. This could happen due to malicious keepers, racing keepers, or simply a state change while the `performUpkeep` transaction is waiting for confirmation. Always validate the data passed in.\",\"params\":{\"_performData\":\"The data which was passed back from the `_checkData` simulation. If it is encoded, it can easily be decoded into other types by calling `abi.decode`. This data should not be trusted, and should be validated against the contract's current state.\"}}},\"title\":\"IChainlinkAutomation\"},\"userdoc\":{\"methods\":{\"checkUpkeep(bytes)\":{\"notice\":\"The method that is simulated by keepers to see if any work actually needs to be performed. This method does does not actually need to be executable, and since it is only ever simulated it can consume a lot of gas.\"},\"performUpkeep(bytes)\":{\"notice\":\"The method that is actually executed by the keepers, via the registry. The data returned by the `checkUpkeep` simulation will be passed into this method to actually be executed.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAutomation.sol\":\"IChainlinkAutomation\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAutomation.sol\":{\"keccak256\":\"0x3ae31d9770fd5f38d78e6c41b714b232fc468c163f1e98bc291d830d375dfd5f\",\"urls\":[\"bzz-raw://f437879eb8bcade6f13a669e9e74f26a3ffff072174ac376a2b67c788133c8e5\",\"dweb:/ipfs/QmTz21iWqeJunyLwb1WsMxmPuix43tSwdxAkU2chK91dKo\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "/*\n\n Copyright 2022 Dolomite.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.5.7;\npragma experimental ABIEncoderV2;\n\n\n/**\n * @title IChainlinkAutomation\n * @author Dolomite\n *\n * @dev Chainlink Automation enables conditional execution of your smart contracts functions through a hyper-reliable\n * and decentralized automation platform that uses the same external network of node operators that secures\n * billions in value. The documentation is copied from Chainlink's official smart contract documentation\n */\ncontract IChainlinkAutomation {\n\n /**\n * @notice The method that is simulated by keepers to see if any work actually needs to be performed. This method\n * does does not actually need to be executable, and since it is only ever simulated it can consume a lot\n * of gas.\n * @dev To ensure that it is never called, you may want to add the `cannotExecute` modifier from `KeeperBase` to\n * your implementation of this method.\n * @param _checkData specified in the upkeep registration so it is always the same for a registered upkeep.\n * This can easily be broken down into specific arguments using `abi.decode`, so multiple\n * up-keeps can be registered on the same contract and easily differentiated by the\n * contract.\n * @return upkeepNeeded A boolean to indicate whether the keeper should call `performUpkeep` or not.\n * @return performData The bytes that the keeper should call `performUpkeep` with, if upkeep is needed. If you\n * would like to encode data to decode later, try `abi.encode`.\n */\n function checkUpkeep(bytes calldata _checkData) external returns (bool upkeepNeeded, bytes memory performData);\n\n /**\n * @notice The method that is actually executed by the keepers, via the registry. The data returned by the\n * `checkUpkeep` simulation will be passed into this method to actually be executed.\n * @dev The input to this method should not be trusted, and the caller of the method should not even be\n * restricted to any single registry. Anyone should be able call it, and the input should be validated,\n * there is no guarantee that the data passed in is the _performData returned from checkUpkeep. This could\n * happen due to malicious keepers, racing keepers, or simply a state change while the `performUpkeep`\n * transaction is waiting for confirmation. Always validate the data passed in.\n * @param _performData The data which was passed back from the `_checkData` simulation. If it is encoded, it\n * can easily be decoded into other types by calling `abi.decode`. This data should not be\n * trusted, and should be validated against the contract's current state.\n */\n function performUpkeep(bytes calldata _performData) external;\n}\n", "sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAutomation.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAutomation.sol", "exportedSymbols": { "IChainlinkAutomation": [ 4208 ] }, "id": 4209, "nodeType": "SourceUnit", "nodes": [ { "id": 4192, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:20" }, { "id": 4193, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title IChainlinkAutomation\n@author Dolomite\n * @dev Chainlink Automation enables conditional execution of your smart contracts functions through a hyper-reliable\n and decentralized automation platform that uses the same external network of node operators that secures\n billions in value. The documentation is copied from Chainlink's official smart contract documentation", "fullyImplemented": false, "id": 4208, "linearizedBaseContracts": [ 4208 ], "name": "IChainlinkAutomation", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@notice The method that is simulated by keepers to see if any work actually needs to be performed. This method\n does does not actually need to be executable, and since it is only ever simulated it can consume a lot\n of gas.\n@dev To ensure that it is never called, you may want to add the `cannotExecute` modifier from `KeeperBase` to\n your implementation of this method.\n@param _checkData specified in the upkeep registration so it is always the same for a registered upkeep.\n This can easily be broken down into specific arguments using `abi.decode`, so multiple\n up-keeps can be registered on the same contract and easily differentiated by the\n contract.\n@return upkeepNeeded A boolean to indicate whether the keeper should call `performUpkeep` or not.\n@return performData The bytes that the keeper should call `performUpkeep` with, if upkeep is needed. If you\n would like to encode data to decode later, try `abi.encode`.", "id": 4202, "implemented": false, "kind": "function", "modifiers": [], "name": "checkUpkeep", "nodeType": "FunctionDefinition", "parameters": { "id": 4196, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4195, "name": "_checkData", "nodeType": "VariableDeclaration", "scope": 4202, "src": "2283:25:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 4194, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2283:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2282:27:20" }, "returnParameters": { "id": 4201, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4198, "name": "upkeepNeeded", "nodeType": "VariableDeclaration", "scope": 4202, "src": "2328:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4197, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2328:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4200, "name": "performData", "nodeType": "VariableDeclaration", "scope": 4202, "src": "2347:24:20", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 4199, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2347:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2327:45:20" }, "scope": 4208, "src": "2262:111:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@notice The method that is actually executed by the keepers, via the registry. The data returned by the\n `checkUpkeep` simulation will be passed into this method to actually be executed.\n@dev The input to this method should not be trusted, and the caller of the method should not even be\n restricted to any single registry. Anyone should be able call it, and the input should be validated,\n there is no guarantee that the data passed in is the _performData returned from checkUpkeep. This could\n happen due to malicious keepers, racing keepers, or simply a state change while the `performUpkeep`\n transaction is waiting for confirmation. Always validate the data passed in.\n@param _performData The data which was passed back from the `_checkData` simulation. If it is encoded, it\n can easily be decoded into other types by calling `abi.decode`. This data should not be\n trusted, and should be validated against the contract's current state.", "id": 4207, "implemented": false, "kind": "function", "modifiers": [], "name": "performUpkeep", "nodeType": "FunctionDefinition", "parameters": { "id": 4205, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4204, "name": "_performData", "nodeType": "VariableDeclaration", "scope": 4207, "src": "3527:27:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 4203, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3527:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "3526:29:20" }, "returnParameters": { "id": 4206, "nodeType": "ParameterList", "parameters": [], "src": "3564:0:20" }, "scope": 4208, "src": "3504:61:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 4209, "src": "1058:2509:20" } ], "src": "595:2973:20" }, "legacyAST": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IChainlinkAutomation.sol", "exportedSymbols": { "IChainlinkAutomation": [ 4208 ] }, "id": 4209, "nodeType": "SourceUnit", "nodes": [ { "id": 4192, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:20" }, { "id": 4193, "literals": [ "experimental", "ABIEncoderV2" ], "nodeType": "PragmaDirective", "src": "619:33:20" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title IChainlinkAutomation\n@author Dolomite\n * @dev Chainlink Automation enables conditional execution of your smart contracts functions through a hyper-reliable\n and decentralized automation platform that uses the same external network of node operators that secures\n billions in value. The documentation is copied from Chainlink's official smart contract documentation", "fullyImplemented": false, "id": 4208, "linearizedBaseContracts": [ 4208 ], "name": "IChainlinkAutomation", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@notice The method that is simulated by keepers to see if any work actually needs to be performed. This method\n does does not actually need to be executable, and since it is only ever simulated it can consume a lot\n of gas.\n@dev To ensure that it is never called, you may want to add the `cannotExecute` modifier from `KeeperBase` to\n your implementation of this method.\n@param _checkData specified in the upkeep registration so it is always the same for a registered upkeep.\n This can easily be broken down into specific arguments using `abi.decode`, so multiple\n up-keeps can be registered on the same contract and easily differentiated by the\n contract.\n@return upkeepNeeded A boolean to indicate whether the keeper should call `performUpkeep` or not.\n@return performData The bytes that the keeper should call `performUpkeep` with, if upkeep is needed. If you\n would like to encode data to decode later, try `abi.encode`.", "id": 4202, "implemented": false, "kind": "function", "modifiers": [], "name": "checkUpkeep", "nodeType": "FunctionDefinition", "parameters": { "id": 4196, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4195, "name": "_checkData", "nodeType": "VariableDeclaration", "scope": 4202, "src": "2283:25:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 4194, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2283:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2282:27:20" }, "returnParameters": { "id": 4201, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4198, "name": "upkeepNeeded", "nodeType": "VariableDeclaration", "scope": 4202, "src": "2328:17:20", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4197, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2328:4:20", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4200, "name": "performData", "nodeType": "VariableDeclaration", "scope": 4202, "src": "2347:24:20", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_bytes_memory_ptr", "typeString": "bytes" }, "typeName": { "id": 4199, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "2347:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "2327:45:20" }, "scope": 4208, "src": "2262:111:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@notice The method that is actually executed by the keepers, via the registry. The data returned by the\n `checkUpkeep` simulation will be passed into this method to actually be executed.\n@dev The input to this method should not be trusted, and the caller of the method should not even be\n restricted to any single registry. Anyone should be able call it, and the input should be validated,\n there is no guarantee that the data passed in is the _performData returned from checkUpkeep. This could\n happen due to malicious keepers, racing keepers, or simply a state change while the `performUpkeep`\n transaction is waiting for confirmation. Always validate the data passed in.\n@param _performData The data which was passed back from the `_checkData` simulation. If it is encoded, it\n can easily be decoded into other types by calling `abi.decode`. This data should not be\n trusted, and should be validated against the contract's current state.", "id": 4207, "implemented": false, "kind": "function", "modifiers": [], "name": "performUpkeep", "nodeType": "FunctionDefinition", "parameters": { "id": 4205, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4204, "name": "_performData", "nodeType": "VariableDeclaration", "scope": 4207, "src": "3527:27:20", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 4203, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "3527:5:20", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" } ], "src": "3526:29:20" }, "returnParameters": { "id": 4206, "nodeType": "ParameterList", "parameters": [], "src": "3564:0:20" }, "scope": 4208, "src": "3504:61:20", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 4209, "src": "1058:2509:20" } ], "src": "595:2973:20" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2025-06-22T04:01:53.517Z", "devdoc": { "author": "Dolomite", "details": "Chainlink Automation enables conditional execution of your smart contracts functions through a hyper-reliable and decentralized automation platform that uses the same external network of node operators that secures billions in value. The documentation is copied from Chainlink's official smart contract documentation", "methods": { "checkUpkeep(bytes)": { "details": "To ensure that it is never called, you may want to add the `cannotExecute` modifier from `KeeperBase` to your implementation of this method.", "params": { "_checkData": "specified in the upkeep registration so it is always the same for a registered upkeep. This can easily be broken down into specific arguments using `abi.decode`, so multiple up-keeps can be registered on the same contract and easily differentiated by the contract." }, "return": "upkeepNeeded A boolean to indicate whether the keeper should call `performUpkeep` or not.performData The bytes that the keeper should call `performUpkeep` with, if upkeep is needed. If you would like to encode data to decode later, try `abi.encode`." }, "performUpkeep(bytes)": { "details": "The input to this method should not be trusted, and the caller of the method should not even be restricted to any single registry. Anyone should be able call it, and the input should be validated, there is no guarantee that the data passed in is the _performData returned from checkUpkeep. This could happen due to malicious keepers, racing keepers, or simply a state change while the `performUpkeep` transaction is waiting for confirmation. Always validate the data passed in.", "params": { "_performData": "The data which was passed back from the `_checkData` simulation. If it is encoded, it can easily be decoded into other types by calling `abi.decode`. This data should not be trusted, and should be validated against the contract's current state." } } }, "title": "IChainlinkAutomation" }, "userdoc": { "methods": { "checkUpkeep(bytes)": { "notice": "The method that is simulated by keepers to see if any work actually needs to be performed. This method does does not actually need to be executable, and since it is only ever simulated it can consume a lot of gas." }, "performUpkeep(bytes)": { "notice": "The method that is actually executed by the keepers, via the registry. The data returned by the `checkUpkeep` simulation will be passed into this method to actually be executed." } } } }