UNPKG

@dolomite-exchange/dolomite-margin

Version:

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

490 lines 19.6 kB
{ "contractName": "IAuthorizationBase", "abi": [ { "constant": true, "inputs": [ { "internalType": "address", "name": "_caller", "type": "address" } ], "name": "isCallerAuthorized", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "_caller", "type": "address" }, { "internalType": "bool", "name": "_isAuthorized", "type": "bool" } ], "name": "setIsCallerAuthorized", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_caller\",\"type\":\"address\"}],\"name\":\"isCallerAuthorized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_caller\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isAuthorized\",\"type\":\"bool\"}],\"name\":\"setIsCallerAuthorized\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Dolomite\",\"methods\":{\"isCallerAuthorized(address)\":{\"params\":{\"_caller\":\"The address that will call the functions of this contract\"},\"return\":\"True if the caller is authorized\"},\"setIsCallerAuthorized(address,bool)\":{\"params\":{\"_caller\":\"The address that will call the `transfer` functions of this contract\",\"_isAuthorized\":\"True if the caller is authorized, false otherwise\"}}},\"title\":\"IAuthorizationBase\"},\"userdoc\":{\"methods\":{},\"notice\":\"Interface for allowing only trusted callers to invoke functions that use the `requireIsCallerAuthorized` modifier.\"}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IAuthorizationBase.sol\":\"IAuthorizationBase\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IAuthorizationBase.sol\":{\"keccak256\":\"0x5f5f602ae759236163193b77c44ee72ef9de8f7824fd9b5aa77b187cbdbb8ef6\",\"urls\":[\"bzz-raw://309b4925df2804a2aa54ec193d10db4b88b7b61eb47d87e5bbb98b95adf71889\",\"dweb:/ipfs/QmdaJ1WJQiMo1sMhvpgmYZScVELoo8h5CTupXXSR2S5tsP\"]}},\"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 IAuthorizationBase\n * @author Dolomite\n * @notice Interface for allowing only trusted callers to invoke functions that use the `requireIsCallerAuthorized`\n * modifier.\n */\ninterface IAuthorizationBase {\n\n /**\n * @param _caller The address that will call the functions of this contract\n * @return True if the caller is authorized\n */\n function isCallerAuthorized(address _caller) external view returns (bool);\n\n /**\n * @param _caller The address that will call the `transfer` functions of this contract\n * @param _isAuthorized True if the caller is authorized, false otherwise\n */\n function setIsCallerAuthorized(address _caller, bool _isAuthorized) external;\n}\n", "sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IAuthorizationBase.sol", "ast": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IAuthorizationBase.sol", "exportedSymbols": { "IAuthorizationBase": [ 3999 ] }, "id": 4000, "nodeType": "SourceUnit", "nodes": [ { "id": 3984, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:14" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": "@title IAuthorizationBase\n@author Dolomite\n@notice Interface for allowing only trusted callers to invoke functions that use the `requireIsCallerAuthorized`\n modifier.", "fullyImplemented": false, "id": 3999, "linearizedBaseContracts": [ 3999 ], "name": "IAuthorizationBase", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@param _caller The address that will call the functions of this contract\n@return True if the caller is authorized", "id": 3991, "implemented": false, "kind": "function", "modifiers": [], "name": "isCallerAuthorized", "nodeType": "FunctionDefinition", "parameters": { "id": 3987, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3986, "name": "_caller", "nodeType": "VariableDeclaration", "scope": 3991, "src": "1039:15:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3985, "name": "address", "nodeType": "ElementaryTypeName", "src": "1039:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1038:17:14" }, "returnParameters": { "id": 3990, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3989, "name": "", "nodeType": "VariableDeclaration", "scope": 3991, "src": "1079:4:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3988, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1079:4:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1078:6:14" }, "scope": 3999, "src": "1011:74:14", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _caller The address that will call the `transfer` functions of this contract\n@param _isAuthorized True if the caller is authorized, false otherwise", "id": 3998, "implemented": false, "kind": "function", "modifiers": [], "name": "setIsCallerAuthorized", "nodeType": "FunctionDefinition", "parameters": { "id": 3996, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3993, "name": "_caller", "nodeType": "VariableDeclaration", "scope": 3998, "src": "1313:15:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3992, "name": "address", "nodeType": "ElementaryTypeName", "src": "1313:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3995, "name": "_isAuthorized", "nodeType": "VariableDeclaration", "scope": 3998, "src": "1330:18:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3994, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1330:4:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1312:37:14" }, "returnParameters": { "id": 3997, "nodeType": "ParameterList", "parameters": [], "src": "1358:0:14" }, "scope": 3999, "src": "1282:77:14", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 4000, "src": "820:541:14" } ], "src": "595:767:14" }, "legacyAST": { "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IAuthorizationBase.sol", "exportedSymbols": { "IAuthorizationBase": [ 3999 ] }, "id": 4000, "nodeType": "SourceUnit", "nodes": [ { "id": 3984, "literals": [ "solidity", "^", "0.5", ".7" ], "nodeType": "PragmaDirective", "src": "595:23:14" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "documentation": "@title IAuthorizationBase\n@author Dolomite\n@notice Interface for allowing only trusted callers to invoke functions that use the `requireIsCallerAuthorized`\n modifier.", "fullyImplemented": false, "id": 3999, "linearizedBaseContracts": [ 3999 ], "name": "IAuthorizationBase", "nodeType": "ContractDefinition", "nodes": [ { "body": null, "documentation": "@param _caller The address that will call the functions of this contract\n@return True if the caller is authorized", "id": 3991, "implemented": false, "kind": "function", "modifiers": [], "name": "isCallerAuthorized", "nodeType": "FunctionDefinition", "parameters": { "id": 3987, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3986, "name": "_caller", "nodeType": "VariableDeclaration", "scope": 3991, "src": "1039:15:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3985, "name": "address", "nodeType": "ElementaryTypeName", "src": "1039:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1038:17:14" }, "returnParameters": { "id": 3990, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3989, "name": "", "nodeType": "VariableDeclaration", "scope": 3991, "src": "1079:4:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3988, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1079:4:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1078:6:14" }, "scope": 3999, "src": "1011:74:14", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": "@param _caller The address that will call the `transfer` functions of this contract\n@param _isAuthorized True if the caller is authorized, false otherwise", "id": 3998, "implemented": false, "kind": "function", "modifiers": [], "name": "setIsCallerAuthorized", "nodeType": "FunctionDefinition", "parameters": { "id": 3996, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 3993, "name": "_caller", "nodeType": "VariableDeclaration", "scope": 3998, "src": "1313:15:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3992, "name": "address", "nodeType": "ElementaryTypeName", "src": "1313:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 3995, "name": "_isAuthorized", "nodeType": "VariableDeclaration", "scope": 3998, "src": "1330:18:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 3994, "name": "bool", "nodeType": "ElementaryTypeName", "src": "1330:4:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "1312:37:14" }, "returnParameters": { "id": 3997, "nodeType": "ParameterList", "parameters": [], "src": "1358:0:14" }, "scope": 3999, "src": "1282:77:14", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 4000, "src": "820:541:14" } ], "src": "595:767:14" }, "compiler": { "name": "solc", "version": "0.5.16+commit.9c3226ce.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.0.23", "updatedAt": "2025-06-22T04:01:53.507Z", "devdoc": { "author": "Dolomite", "methods": { "isCallerAuthorized(address)": { "params": { "_caller": "The address that will call the functions of this contract" }, "return": "True if the caller is authorized" }, "setIsCallerAuthorized(address,bool)": { "params": { "_caller": "The address that will call the `transfer` functions of this contract", "_isAuthorized": "True if the caller is authorized, false otherwise" } } }, "title": "IAuthorizationBase" }, "userdoc": { "methods": {}, "notice": "Interface for allowing only trusted callers to invoke functions that use the `requireIsCallerAuthorized` modifier." } }