UNPKG

@etherisc/gif-interface

Version:

This repository holds the necessary interfaces and base contracts to interact with an existing GIF instance. The repository is not intended to be used on its own.

930 lines 29.8 kB
{ "abi": [ { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "addRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getDefaultAdminRole", "outputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getOracleProviderRole", "outputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getProductOwnerRole", "outputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getRiskpoolKeeperRole", "outputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "principal", "type": "address" } ], "name": "grantRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "principal", "type": "address" } ], "name": "hasRole", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" } ], "name": "invalidateRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "principal", "type": "address" } ], "name": "renounceRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "role", "type": "bytes32" }, { "internalType": "address", "name": "principal", "type": "address" } ], "name": "revokeRole", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "allSourcePaths": { "14": "contracts/modules/IAccess.sol" }, "ast": { "absolutePath": "contracts/modules/IAccess.sol", "exportedSymbols": { "IAccess": [ 2660 ] }, "id": 2661, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 2599, "literals": [ "solidity", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:22:14" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "interface", "fullyImplemented": false, "id": 2660, "linearizedBaseContracts": [ 2660 ], "name": "IAccess", "nameLocation": "73:7:14", "nodeType": "ContractDefinition", "nodes": [ { "functionSelector": "52a9c8d7", "id": 2604, "implemented": false, "kind": "function", "modifiers": [], "name": "getDefaultAdminRole", "nameLocation": "96:19:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2600, "nodeType": "ParameterList", "parameters": [], "src": "115:2:14" }, "returnParameters": { "id": 2603, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2602, "mutability": "mutable", "name": "role", "nameLocation": "148:4:14", "nodeType": "VariableDeclaration", "scope": 2604, "src": "140:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2601, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "140:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "139:14:14" }, "scope": 2660, "src": "87:67:14", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "775a4048", "id": 2609, "implemented": false, "kind": "function", "modifiers": [], "name": "getProductOwnerRole", "nameLocation": "168:19:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2605, "nodeType": "ParameterList", "parameters": [], "src": "187:2:14" }, "returnParameters": { "id": 2608, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2607, "mutability": "mutable", "name": "role", "nameLocation": "220:4:14", "nodeType": "VariableDeclaration", "scope": 2609, "src": "212:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2606, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "212:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "211:14:14" }, "scope": 2660, "src": "159:67:14", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "d49d21c0", "id": 2614, "implemented": false, "kind": "function", "modifiers": [], "name": "getOracleProviderRole", "nameLocation": "240:21:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2610, "nodeType": "ParameterList", "parameters": [], "src": "261:2:14" }, "returnParameters": { "id": 2613, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2612, "mutability": "mutable", "name": "role", "nameLocation": "294:4:14", "nodeType": "VariableDeclaration", "scope": 2614, "src": "286:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2611, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "286:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "285:14:14" }, "scope": 2660, "src": "231:69:14", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "3ffdd2f3", "id": 2619, "implemented": false, "kind": "function", "modifiers": [], "name": "getRiskpoolKeeperRole", "nameLocation": "314:21:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2615, "nodeType": "ParameterList", "parameters": [], "src": "335:2:14" }, "returnParameters": { "id": 2618, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2617, "mutability": "mutable", "name": "role", "nameLocation": "368:4:14", "nodeType": "VariableDeclaration", "scope": 2619, "src": "360:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2616, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "360:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "359:14:14" }, "scope": 2660, "src": "305:69:14", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "91d14854", "id": 2628, "implemented": false, "kind": "function", "modifiers": [], "name": "hasRole", "nameLocation": "388:7:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2624, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2621, "mutability": "mutable", "name": "role", "nameLocation": "404:4:14", "nodeType": "VariableDeclaration", "scope": 2628, "src": "396:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2620, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "396:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 2623, "mutability": "mutable", "name": "principal", "nameLocation": "418:9:14", "nodeType": "VariableDeclaration", "scope": 2628, "src": "410:17:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2622, "name": "address", "nodeType": "ElementaryTypeName", "src": "410:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "395:33:14" }, "returnParameters": { "id": 2627, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2626, "mutability": "mutable", "name": "", "nameLocation": "-1:-1:-1", "nodeType": "VariableDeclaration", "scope": 2628, "src": "451:4:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 2625, "name": "bool", "nodeType": "ElementaryTypeName", "src": "451:4:14", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "visibility": "internal" } ], "src": "450:6:14" }, "scope": 2660, "src": "379:78:14", "stateMutability": "view", "virtual": false, "visibility": "external" }, { "functionSelector": "2f2ff15d", "id": 2635, "implemented": false, "kind": "function", "modifiers": [], "name": "grantRole", "nameLocation": "472:9:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2633, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2630, "mutability": "mutable", "name": "role", "nameLocation": "490:4:14", "nodeType": "VariableDeclaration", "scope": 2635, "src": "482:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2629, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "482:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 2632, "mutability": "mutable", "name": "principal", "nameLocation": "504:9:14", "nodeType": "VariableDeclaration", "scope": 2635, "src": "496:17:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2631, "name": "address", "nodeType": "ElementaryTypeName", "src": "496:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "481:33:14" }, "returnParameters": { "id": 2634, "nodeType": "ParameterList", "parameters": [], "src": "523:0:14" }, "scope": 2660, "src": "463:61:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "d547741f", "id": 2642, "implemented": false, "kind": "function", "modifiers": [], "name": "revokeRole", "nameLocation": "538:10:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2640, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2637, "mutability": "mutable", "name": "role", "nameLocation": "557:4:14", "nodeType": "VariableDeclaration", "scope": 2642, "src": "549:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2636, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "549:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 2639, "mutability": "mutable", "name": "principal", "nameLocation": "571:9:14", "nodeType": "VariableDeclaration", "scope": 2642, "src": "563:17:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2638, "name": "address", "nodeType": "ElementaryTypeName", "src": "563:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "548:33:14" }, "returnParameters": { "id": 2641, "nodeType": "ParameterList", "parameters": [], "src": "590:0:14" }, "scope": 2660, "src": "529:62:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "36568abe", "id": 2649, "implemented": false, "kind": "function", "modifiers": [], "name": "renounceRole", "nameLocation": "605:12:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2647, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2644, "mutability": "mutable", "name": "role", "nameLocation": "626:4:14", "nodeType": "VariableDeclaration", "scope": 2649, "src": "618:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2643, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "618:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" }, { "constant": false, "id": 2646, "mutability": "mutable", "name": "principal", "nameLocation": "640:9:14", "nodeType": "VariableDeclaration", "scope": 2649, "src": "632:17:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2645, "name": "address", "nodeType": "ElementaryTypeName", "src": "632:7:14", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "visibility": "internal" } ], "src": "617:33:14" }, "returnParameters": { "id": 2648, "nodeType": "ParameterList", "parameters": [], "src": "659:0:14" }, "scope": 2660, "src": "596:64:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "274b02a7", "id": 2654, "implemented": false, "kind": "function", "modifiers": [], "name": "addRole", "nameLocation": "679:7:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2652, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2651, "mutability": "mutable", "name": "role", "nameLocation": "695:4:14", "nodeType": "VariableDeclaration", "scope": 2654, "src": "687:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2650, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "687:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "686:14:14" }, "returnParameters": { "id": 2653, "nodeType": "ParameterList", "parameters": [], "src": "709:0:14" }, "scope": 2660, "src": "670:40:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" }, { "functionSelector": "d17d0233", "id": 2659, "implemented": false, "kind": "function", "modifiers": [], "name": "invalidateRole", "nameLocation": "724:14:14", "nodeType": "FunctionDefinition", "parameters": { "id": 2657, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2656, "mutability": "mutable", "name": "role", "nameLocation": "747:4:14", "nodeType": "VariableDeclaration", "scope": 2659, "src": "739:12:14", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 2655, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "739:7:14", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "visibility": "internal" } ], "src": "738:14:14" }, "returnParameters": { "id": 2658, "nodeType": "ParameterList", "parameters": [], "src": "761:0:14" }, "scope": 2660, "src": "715:47:14", "stateMutability": "nonpayable", "virtual": false, "visibility": "external" } ], "scope": 2661, "src": "63:701:14" } ], "src": "39:726:14" }, "bytecode": "", "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.2+commit.661d1103" }, "contractName": "IAccess", "coverageMap": { "branches": {}, "statements": {} }, "dependencies": [], "deployedBytecode": "", "deployedSourceMap": "", "language": "Solidity", "natspec": { "kind": "dev", "methods": {}, "version": 1 }, "offset": [ 63, 764 ], "opcodes": "", "pcMap": {}, "sha1": "a627854a98fb7c354fa37ef6c8d43b90735ce377", "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.2;\n\ninterface IAccess {\n function getDefaultAdminRole() external view returns(bytes32 role);\n function getProductOwnerRole() external view returns(bytes32 role);\n function getOracleProviderRole() external view returns(bytes32 role);\n function getRiskpoolKeeperRole() external view returns(bytes32 role);\n function hasRole(bytes32 role, address principal) external view returns(bool);\n\n function grantRole(bytes32 role, address principal) external;\n function revokeRole(bytes32 role, address principal) external;\n function renounceRole(bytes32 role, address principal) external;\n \n function addRole(bytes32 role) external;\n function invalidateRole(bytes32 role) external;\n}\n", "sourceMap": "", "sourcePath": "contracts/modules/IAccess.sol", "type": "interface" }