UNPKG

@dolomite-exchange/dolomite-margin

Version:

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

1,249 lines 50.3 kB
{ "contractName": "ILiquidatorAssetRegistry", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "liquidator", "type": "address" } ], "name": "LiquidatorAddedToWhitelist", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "liquidator", "type": "address" } ], "name": "LiquidatorRemovedFromWhitelist", "type": "event" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "_marketId", "type": "uint256" }, { "internalType": "address", "name": "_liquidator", "type": "address" } ], "name": "ownerAddLiquidatorToAssetWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "_marketId", "type": "uint256" }, { "internalType": "address", "name": "_liquidator", "type": "address" } ], "name": "ownerRemoveLiquidatorFromAssetWhitelist", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "_marketId", "type": "uint256" } ], "name": "getLiquidatorsForAsset", "outputs": [ { "internalType": "address[]", "name": "", "type": "address[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "_marketId", "type": "uint256" }, { "internalType": "address", "name": "_liquidator", "type": "address" } ], "name": "isAssetWhitelistedForLiquidation", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"marketId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"}],\"name\":\"LiquidatorAddedToWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"marketId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"}],\"name\":\"LiquidatorRemovedFromWhitelist\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"}],\"name\":\"getLiquidatorsForAsset\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_liquidator\",\"type\":\"address\"}],\"name\":\"isAssetWhitelistedForLiquidation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_liquidator\",\"type\":\"address\"}],\"name\":\"ownerAddLiquidatorToAssetWhitelist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_liquidator\",\"type\":\"address\"}],\"name\":\"ownerRemoveLiquidatorFromAssetWhitelist\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Dolomite * Interface for a registry that tracks which assets can be liquidated and by each contract\",\"methods\":{\"getLiquidatorsForAsset(uint256)\":{\"params\":{\"_marketId\":\"The market ID of the asset to check\"},\"return\":\"An array of whitelisted liquidators for the asset. An empty array is returned if any liquidator can be used for this asset\"},\"isAssetWhitelistedForLiquidation(uint256,address)\":{\"params\":{\"_liquidator\":\"The address of the liquidator to check\",\"_marketId\":\"The market ID of the asset to check\"},\"return\":\"True if the liquidator is whitelisted for the asset, false otherwise. Returns true if there are no whitelisted liquidators for the asset.\"},\"ownerAddLiquidatorToAssetWhitelist(uint256,address)\":{\"params\":{\"_liquidator\":\"The address of the liquidator to add\",\"_marketId\":\"The market ID of the asset\"}},\"ownerRemoveLiquidatorFromAssetWhitelist(uint256,address)\":{\"params\":{\"_liquidator\":\"The address of the liquidator to remove\",\"_marketId\":\"The market ID of the asset\"}}},\"title\":\"ILiquidatorAssetRegistry\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ILiquidatorAssetRegistry.sol\":\"ILiquidatorAssetRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ILiquidatorAssetRegistry.sol\":{\"keccak256\":\"0x0d99615ee12fad08fbdf59a67683af9c7cdcfd2f25cf20b6767ebb6988eec514\",\"urls\":[\"bzz-raw://90230d7a44d9936cda8d1b1fef170daf91750b97d3da9634ed6c079fb8dbd15a\",\"dweb:/ipfs/QmfQxDE36en2hecxS4Y2i4BH6TsSEDEzKNxooysW4GsdKb\"]}},\"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;\n\n\n/**\n * @title ILiquidatorAssetRegistry\n * @author Dolomite\n *\n * Interface for a registry that tracks which assets can be liquidated and by each contract\n */\ninterface ILiquidatorAssetRegistry {\n\n // ============== Events ==============\n\n event LiquidatorAddedToWhitelist(\n uint256 indexed marketId,\n address indexed liquidator\n );\n\n event LiquidatorRemovedFromWhitelist(\n uint256 indexed marketId,\n address indexed liquidator\n );\n\n // ========== Public Functions ==========\n\n /**\n * @param _marketId The market ID of the asset\n * @param _liquidator The address of the liquidator to add\n */\n function ownerAddLiquidatorToAssetWhitelist(\n uint256 _marketId,\n address _liquidator\n )\n external;\n\n /**\n * @param _marketId The market ID of the asset\n * @param _liquidator The address of the liquidator to remove\n */\n function ownerRemoveLiquidatorFromAssetWhitelist(\n uint256 _marketId,\n address _liquidator\n )\n external;\n\n /**\n * @param _marketId The market ID of the asset to check\n * @return An array of whitelisted liquidators for the asset. An empty array is returned if any liquidator can be\n * used for this asset\n */\n function getLiquidatorsForAsset(\n uint256 _marketId\n )\n external view returns (address[] memory);\n\n /**\n * @param _marketId The market ID of the asset to check\n * @param _liquidator The address of the liquidator to check\n * @return True if the liquidator is whitelisted for the asset, false otherwise. Returns true if there\n * are no whitelisted liquidators for the asset.\n */\n function isAssetWhitelistedForLiquidation(\n uint256 _marketId,\n address _liquidator\n )\n external view returns (bool);\n}\n", "sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ILiquidatorAssetRegistry.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ILiquidatorAssetRegistry.sol", "exportedSymbols": { "ILiquidatorAssetRegistry": [ 4874 ] }, "id": 4875, "nodeType": "SourceUnit", "nodes": [ { "id": 4830, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:30" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": "@title ILiquidatorAssetRegistry\n@author Dolomite\n * Interface for a registry that tracks which assets can be liquidated and by each contract", "fullyImplemented": false, "id": 4874, "linearizedBaseContracts": [ 4874 ], "name": "ILiquidatorAssetRegistry", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 4836, "name": "LiquidatorAddedToWhitelist", "nodeType": "EventDefinition", "parameters": { "id": 4835, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4832, "indexed": true, "name": "marketId", "nodeType": "VariableDeclaration", "scope": 4836, "src": "911:24:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4831, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "911:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4834, "indexed": true, "name": "liquidator", "nodeType": "VariableDeclaration", "scope": 4836, "src": "945:26:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4833, "name": "address", "nodeType": "ElementaryTypeName", "src": "945:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "901:76:30" }, "src": "869:109:30" }, { "anonymous": false, "documentation": null, "id": 4842, "name": "LiquidatorRemovedFromWhitelist", "nodeType": "EventDefinition", "parameters": { "id": 4841, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4838, "indexed": true, "name": "marketId", "nodeType": "VariableDeclaration", "scope": 4842, "src": "1030:24:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4837, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1030:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4840, "indexed": true, "name": "liquidator", "nodeType": "VariableDeclaration", "scope": 4842, "src": "1064:26:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4839, "name": "address", "nodeType": "ElementaryTypeName", "src": "1064:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1020:76:30" }, "src": "984:113:30" }, { "body": null, "documentation": "@param _marketId The market ID of the asset\n@param _liquidator The address of the liquidator to add", "id": 4849, "implemented": false, "kind": "function", "modifiers": [], "name": "ownerAddLiquidatorToAssetWhitelist", "nodeType": "FunctionDefinition", "parameters": { "id": 4847, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4844, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4849, "src": "1339:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4843, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1339:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4846, "name": "_liquidator", "nodeType": "VariableDeclaration", "scope": 4849, "src": "1366:19:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4845, "name": "address", "nodeType": "ElementaryTypeName", "src": "1366:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1329:62:30" }, "returnParameters": { "id": 4848, "nodeType": "ParameterList", "parameters": [], "src": "1404:0:30" }, "scope": 4874, "src": "1286:119:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _marketId The market ID of the asset\n@param _liquidator The address of the liquidator to remove", "id": 4856, "implemented": false, "kind": "function", "modifiers": [], "name": "ownerRemoveLiquidatorFromAssetWhitelist", "nodeType": "FunctionDefinition", "parameters": { "id": 4854, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4851, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4856, "src": "1608:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4850, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1608:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4853, "name": "_liquidator", "nodeType": "VariableDeclaration", "scope": 4856, "src": "1635:19:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4852, "name": "address", "nodeType": "ElementaryTypeName", "src": "1635:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1598:62:30" }, "returnParameters": { "id": 4855, "nodeType": "ParameterList", "parameters": [], "src": "1673:0:30" }, "scope": 4874, "src": "1550:124:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _marketId The market ID of the asset to check\n@return An array of whitelisted liquidators for the asset. An empty array is returned if any liquidator can be\n used for this asset", "id": 4864, "implemented": false, "kind": "function", "modifiers": [], "name": "getLiquidatorsForAsset", "nodeType": "FunctionDefinition", "parameters": { "id": 4859, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4858, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4864, "src": "1955:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4857, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1955:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1945:33:30" }, "returnParameters": { "id": 4863, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4862, "name": "", "nodeType": "VariableDeclaration", "scope": 4864, "src": "2006:16:30", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 4860, "name": "address", "nodeType": "ElementaryTypeName", "src": "2006:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4861, "length": null, "nodeType": "ArrayTypeName", "src": "2006:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "2005:18:30" }, "scope": 4874, "src": "1914:110:30", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _marketId The market ID of the asset to check\n@param _liquidator The address of the liquidator to check\n@return True if the liquidator is whitelisted for the asset, false otherwise. Returns true if there\n are no whitelisted liquidators for the asset.", "id": 4873, "implemented": false, "kind": "function", "modifiers": [], "name": "isAssetWhitelistedForLiquidation", "nodeType": "FunctionDefinition", "parameters": { "id": 4869, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4866, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4873, "src": "2422:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4865, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2422:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4868, "name": "_liquidator", "nodeType": "VariableDeclaration", "scope": 4873, "src": "2449:19:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4867, "name": "address", "nodeType": "ElementaryTypeName", "src": "2449:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2412:62:30" }, "returnParameters": { "id": 4872, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4871, "name": "", "nodeType": "VariableDeclaration", "scope": 4873, "src": "2502:4:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4870, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2502:4:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "2501:6:30" }, "scope": 4874, "src": "2371:137:30", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], "scope": 4875, "src": "782:1728:30" } ], "src": "595:1916:30" }, "legacyAST": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/ILiquidatorAssetRegistry.sol", "exportedSymbols": { "ILiquidatorAssetRegistry": [ 4874 ] }, "id": 4875, "nodeType": "SourceUnit", "nodes": [ { "id": 4830, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:30" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": "@title ILiquidatorAssetRegistry\n@author Dolomite\n * Interface for a registry that tracks which assets can be liquidated and by each contract", "fullyImplemented": false, "id": 4874, "linearizedBaseContracts": [ 4874 ], "name": "ILiquidatorAssetRegistry", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 4836, "name": "LiquidatorAddedToWhitelist", "nodeType": "EventDefinition", "parameters": { "id": 4835, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4832, "indexed": true, "name": "marketId", "nodeType": "VariableDeclaration", "scope": 4836, "src": "911:24:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4831, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "911:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4834, "indexed": true, "name": "liquidator", "nodeType": "VariableDeclaration", "scope": 4836, "src": "945:26:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4833, "name": "address", "nodeType": "ElementaryTypeName", "src": "945:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "901:76:30" }, "src": "869:109:30" }, { "anonymous": false, "documentation": null, "id": 4842, "name": "LiquidatorRemovedFromWhitelist", "nodeType": "EventDefinition", "parameters": { "id": 4841, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4838, "indexed": true, "name": "marketId", "nodeType": "VariableDeclaration", "scope": 4842, "src": "1030:24:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4837, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1030:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4840, "indexed": true, "name": "liquidator", "nodeType": "VariableDeclaration", "scope": 4842, "src": "1064:26:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4839, "name": "address", "nodeType": "ElementaryTypeName", "src": "1064:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1020:76:30" }, "src": "984:113:30" }, { "body": null, "documentation": "@param _marketId The market ID of the asset\n@param _liquidator The address of the liquidator to add", "id": 4849, "implemented": false, "kind": "function", "modifiers": [], "name": "ownerAddLiquidatorToAssetWhitelist", "nodeType": "FunctionDefinition", "parameters": { "id": 4847, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4844, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4849, "src": "1339:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4843, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1339:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4846, "name": "_liquidator", "nodeType": "VariableDeclaration", "scope": 4849, "src": "1366:19:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4845, "name": "address", "nodeType": "ElementaryTypeName", "src": "1366:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1329:62:30" }, "returnParameters": { "id": 4848, "nodeType": "ParameterList", "parameters": [], "src": "1404:0:30" }, "scope": 4874, "src": "1286:119:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _marketId The market ID of the asset\n@param _liquidator The address of the liquidator to remove", "id": 4856, "implemented": false, "kind": "function", "modifiers": [], "name": "ownerRemoveLiquidatorFromAssetWhitelist", "nodeType": "FunctionDefinition", "parameters": { "id": 4854, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4851, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4856, "src": "1608:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4850, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1608:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4853, "name": "_liquidator", "nodeType": "VariableDeclaration", "scope": 4856, "src": "1635:19:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4852, "name": "address", "nodeType": "ElementaryTypeName", "src": "1635:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1598:62:30" }, "returnParameters": { "id": 4855, "nodeType": "ParameterList", "parameters": [], "src": "1673:0:30" }, "scope": 4874, "src": "1550:124:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _marketId The market ID of the asset to check\n@return An array of whitelisted liquidators for the asset. An empty array is returned if any liquidator can be\n used for this asset", "id": 4864, "implemented": false, "kind": "function", "modifiers": [], "name": "getLiquidatorsForAsset", "nodeType": "FunctionDefinition", "parameters": { "id": 4859, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4858, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4864, "src": "1955:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4857, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1955:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1945:33:30" }, "returnParameters": { "id": 4863, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4862, "name": "", "nodeType": "VariableDeclaration", "scope": 4864, "src": "2006:16:30", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 4860, "name": "address", "nodeType": "ElementaryTypeName", "src": "2006:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4861, "length": null, "nodeType": "ArrayTypeName", "src": "2006:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "2005:18:30" }, "scope": 4874, "src": "1914:110:30", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _marketId The market ID of the asset to check\n@param _liquidator The address of the liquidator to check\n@return True if the liquidator is whitelisted for the asset, false otherwise. Returns true if there\n are no whitelisted liquidators for the asset.", "id": 4873, "implemented": false, "kind": "function", "modifiers": [], "name": "isAssetWhitelistedForLiquidation", "nodeType": "FunctionDefinition", "parameters": { "id": 4869, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4866, "name": "_marketId", "nodeType": "VariableDeclaration", "scope": 4873, "src": "2422:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4865, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "2422:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4868, "name": "_liquidator", "nodeType": "VariableDeclaration", "scope": 4873, "src": "2449:19:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4867, "name": "address", "nodeType": "ElementaryTypeName", "src": "2449:7:30", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "2412:62:30" }, "returnParameters": { "id": 4872, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4871, "name": "", "nodeType": "VariableDeclaration", "scope": 4873, "src": "2502:4:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4870, "name": "bool", "nodeType": "ElementaryTypeName", "src": "2502:4:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "2501:6:30" }, "scope": 4874, "src": "2371:137:30", "stateMutability": "view", "superFunction": null, "visibility": "external" } ], "scope": 4875, "src": "782:1728:30" } ], "src": "595:1916:30" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2025-06-22T04:01:53.531Z", "devdoc": { "author": "Dolomite * Interface for a registry that tracks which assets can be liquidated and by each contract", "methods": { "getLiquidatorsForAsset(uint256)": { "params": { "_marketId": "The market ID of the asset to check" }, "return": "An array of whitelisted liquidators for the asset. An empty array is returned if any liquidator can be used for this asset" }, "isAssetWhitelistedForLiquidation(uint256,address)": { "params": { "_liquidator": "The address of the liquidator to check", "_marketId": "The market ID of the asset to check" }, "return": "True if the liquidator is whitelisted for the asset, false otherwise. Returns true if there are no whitelisted liquidators for the asset." }, "ownerAddLiquidatorToAssetWhitelist(uint256,address)": { "params": { "_liquidator": "The address of the liquidator to add", "_marketId": "The market ID of the a