@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
732 lines • 28.7 kB
JSON
{
"contractName": "IOracleSentinel",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "gracePeriod",
"type": "uint256"
}
],
"name": "GracePeriodSet",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_gracePeriod",
"type": "uint256"
}
],
"name": "ownerSetGracePeriod",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isBorrowAllowed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "isLiquidationAllowed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "gracePeriod",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gracePeriod\",\"type\":\"uint256\"}],\"name\":\"GracePeriodSet\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"gracePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isBorrowAllowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isLiquidationAllowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gracePeriod\",\"type\":\"uint256\"}],\"name\":\"ownerSetGracePeriod\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Dolomite * Interface that Dolomite pings to check if the Blockchain or L2 is alive, if liquidations should be processed, and if markets should are in size-down only mode.\",\"methods\":{\"gracePeriod()\":{\"return\":\"The duration between when the feed comes back online and when the system will allow liquidations to be processed normally\"},\"isBorrowAllowed()\":{\"return\":\"True if new borrows should be allowed, false otherwise\"},\"isLiquidationAllowed()\":{\"return\":\"True if liquidations should be allowed, false otherwise\"},\"ownerSetGracePeriod(uint256)\":{\"details\":\"Allows the owner to set the grace period duration, which specifies how long the system will disallow liquidations after sequencer is back online. Only callable by the owner.\",\"params\":{\"_gracePeriod\":\"The new duration of the grace period\"}}},\"title\":\"IOracleSentinel\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IOracleSentinel.sol\":\"IOracleSentinel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IOracleSentinel.sol\":{\"keccak256\":\"0xa94499fda55ef112640daed2cb1d06062e72c51c7b925c323b4e0ffa9b456ce5\",\"urls\":[\"bzz-raw://18b4a16acac577590a57f34f7ec6583e3cb35f575c948abb928b308d29cac1ab\",\"dweb:/ipfs/QmR1jLkzj6w7SjrdZ7GVW4V2vofSdMJwzjTqKpeUKABvxu\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "/*\n\n Copyright 2023 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 IOracleSentinel\n * @author Dolomite\n *\n * Interface that Dolomite pings to check if the Blockchain or L2 is alive, if liquidations should be processed, and if\n * markets should are in size-down only mode.\n */\ncontract IOracleSentinel {\n\n // ============ Events ============\n\n event GracePeriodSet(\n uint256 gracePeriod\n );\n\n // ============ Functions ============\n\n /**\n * @dev Allows the owner to set the grace period duration, which specifies how long the system will disallow\n * liquidations after sequencer is back online. Only callable by the owner.\n *\n * @param _gracePeriod The new duration of the grace period\n */\n function ownerSetGracePeriod(\n uint256 _gracePeriod\n )\n external;\n\n /**\n * @return True if new borrows should be allowed, false otherwise\n */\n function isBorrowAllowed() external view returns (bool);\n\n /**\n * @return True if liquidations should be allowed, false otherwise\n */\n function isLiquidationAllowed() external view returns (bool);\n\n /**\n * @return The duration between when the feed comes back online and when the system will allow liquidations to be\n * processed normally\n */\n function gracePeriod() external view returns (uint256);\n}\n",
"sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IOracleSentinel.sol",
"ast": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IOracleSentinel.sol",
"exportedSymbols": {
"IOracleSentinel": [
24817
]
},
"id": 24818,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 24791,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "594:23:85"
},
{
"id": 24792,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "618:33:85"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title IOracleSentinel\n@author Dolomite\n * Interface that Dolomite pings to check if the Blockchain or L2 is alive, if liquidations should be processed, and if\nmarkets should are in size-down only mode.",
"fullyImplemented": false,
"id": 24817,
"linearizedBaseContracts": [
24817
],
"name": "IOracleSentinel",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 24796,
"name": "GracePeriodSet",
"nodeType": "EventDefinition",
"parameters": {
"id": 24795,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24794,
"indexed": false,
"name": "gracePeriod",
"nodeType": "VariableDeclaration",
"scope": 24796,
"src": "980:19:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24793,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "980:7:85",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "970:35:85"
},
"src": "950:56:85"
},
{
"body": null,
"documentation": "@dev Allows the owner to set the grace period duration, which specifies how long the system will disallow\n liquidations after sequencer is back online. Only callable by the owner.\n * @param _gracePeriod The new duration of the grace period",
"id": 24801,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "ownerSetGracePeriod",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24799,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24798,
"name": "_gracePeriod",
"nodeType": "VariableDeclaration",
"scope": 24801,
"src": "1380:20:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24797,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1380:7:85",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1370:36:85"
},
"returnParameters": {
"id": 24800,
"nodeType": "ParameterList",
"parameters": [],
"src": "1423:0:85"
},
"scope": 24817,
"src": "1342:82:85",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@return True if new borrows should be allowed, false otherwise",
"id": 24806,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isBorrowAllowed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24802,
"nodeType": "ParameterList",
"parameters": [],
"src": "1540:2:85"
},
"returnParameters": {
"id": 24805,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24804,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 24806,
"src": "1566:4:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 24803,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1566:4:85",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1565:6:85"
},
"scope": 24817,
"src": "1516:56:85",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@return True if liquidations should be allowed, false otherwise",
"id": 24811,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isLiquidationAllowed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24807,
"nodeType": "ParameterList",
"parameters": [],
"src": "1694:2:85"
},
"returnParameters": {
"id": 24810,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24809,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 24811,
"src": "1720:4:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 24808,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1720:4:85",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1719:6:85"
},
"scope": 24817,
"src": "1665:61:85",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@return The duration between when the feed comes back online and when the system will allow liquidations to be\n processed normally",
"id": 24816,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "gracePeriod",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24812,
"nodeType": "ParameterList",
"parameters": [],
"src": "1922:2:85"
},
"returnParameters": {
"id": 24815,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24814,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 24816,
"src": "1948:7:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24813,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1948:7:85",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1947:9:85"
},
"scope": 24817,
"src": "1902:55:85",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 24818,
"src": "877:1082:85"
}
],
"src": "594:1366:85"
},
"legacyAST": {
"absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IOracleSentinel.sol",
"exportedSymbols": {
"IOracleSentinel": [
24817
]
},
"id": 24818,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 24791,
"literals": [
"solidity",
"^",
"0.5",
".7"
],
"nodeType": "PragmaDirective",
"src": "594:23:85"
},
{
"id": 24792,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "618:33:85"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": "@title IOracleSentinel\n@author Dolomite\n * Interface that Dolomite pings to check if the Blockchain or L2 is alive, if liquidations should be processed, and if\nmarkets should are in size-down only mode.",
"fullyImplemented": false,
"id": 24817,
"linearizedBaseContracts": [
24817
],
"name": "IOracleSentinel",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 24796,
"name": "GracePeriodSet",
"nodeType": "EventDefinition",
"parameters": {
"id": 24795,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24794,
"indexed": false,
"name": "gracePeriod",
"nodeType": "VariableDeclaration",
"scope": 24796,
"src": "980:19:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24793,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "980:7:85",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "970:35:85"
},
"src": "950:56:85"
},
{
"body": null,
"documentation": "@dev Allows the owner to set the grace period duration, which specifies how long the system will disallow\n liquidations after sequencer is back online. Only callable by the owner.\n * @param _gracePeriod The new duration of the grace period",
"id": 24801,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "ownerSetGracePeriod",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24799,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24798,
"name": "_gracePeriod",
"nodeType": "VariableDeclaration",
"scope": 24801,
"src": "1380:20:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24797,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1380:7:85",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1370:36:85"
},
"returnParameters": {
"id": 24800,
"nodeType": "ParameterList",
"parameters": [],
"src": "1423:0:85"
},
"scope": 24817,
"src": "1342:82:85",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@return True if new borrows should be allowed, false otherwise",
"id": 24806,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isBorrowAllowed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24802,
"nodeType": "ParameterList",
"parameters": [],
"src": "1540:2:85"
},
"returnParameters": {
"id": 24805,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24804,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 24806,
"src": "1566:4:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 24803,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1566:4:85",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1565:6:85"
},
"scope": 24817,
"src": "1516:56:85",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@return True if liquidations should be allowed, false otherwise",
"id": 24811,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "isLiquidationAllowed",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24807,
"nodeType": "ParameterList",
"parameters": [],
"src": "1694:2:85"
},
"returnParameters": {
"id": 24810,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24809,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 24811,
"src": "1720:4:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 24808,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1720:4:85",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1719:6:85"
},
"scope": 24817,
"src": "1665:61:85",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": "@return The duration between when the feed comes back online and when the system will allow liquidations to be\n processed normally",
"id": 24816,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "gracePeriod",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 24812,
"nodeType": "ParameterList",
"parameters": [],
"src": "1922:2:85"
},
"returnParameters": {
"id": 24815,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24814,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 24816,
"src": "1948:7:85",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 24813,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1948:7:85",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1947:9:85"
},
"scope": 24817,
"src": "1902:55:85",
"stateMutability": "view",
"superFunction": null,
"visibility": "external"
}
],
"scope": 24818,
"src": "877:1082:85"
}
],
"src": "594:1366:85"
},
"compiler": {
"name": "solc",
"version": "0.5.16+commit.9c3226ce.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.23",
"updatedAt": "2025-06-22T04:01:53.959Z",
"devdoc": {
"author": "Dolomite * Interface that Dolomite pings to check if the Blockchain or L2 is alive, if liquidations should be processed, and if markets should are in size-down only mode.",
"methods": {
"gracePeriod()": {
"return": "The duration between when the feed comes back online and when the system will allow liquidations to be processed normally"
},
"isBorrowAllowed()": {
"return": "True if new borrows should be allowed, false otherwise"
},
"isLiquidationAllowed()": {
"return": "True if liquidations should be allowed, false otherwise"
},
"ownerSetGracePeriod(uint256)": {
"details": "Allows the owner to set the grace period duration, which specifies how long the system will disallow liquidations after sequencer is back online. Only callable by the owner.",
"params": {
"_gracePeriod": "The new duration of the grace period"
}
}
},
"title": "IOracleSentinel"
},
"userdoc": {
"methods": {}
}
}