@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
930 lines • 30.1 kB
JSON
{
"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": {
"33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"exportedSymbols": {
"IAccess": [
22927
]
},
"id": 22928,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 22866,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:33"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 22927,
"linearizedBaseContracts": [
22927
],
"name": "IAccess",
"nameLocation": "73:7:33",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "52a9c8d7",
"id": 22871,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getDefaultAdminRole",
"nameLocation": "96:19:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22867,
"nodeType": "ParameterList",
"parameters": [],
"src": "115:2:33"
},
"returnParameters": {
"id": 22870,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22869,
"mutability": "mutable",
"name": "role",
"nameLocation": "148:4:33",
"nodeType": "VariableDeclaration",
"scope": 22871,
"src": "140:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22868,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "140:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "139:14:33"
},
"scope": 22927,
"src": "87:67:33",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "775a4048",
"id": 22876,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getProductOwnerRole",
"nameLocation": "168:19:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22872,
"nodeType": "ParameterList",
"parameters": [],
"src": "187:2:33"
},
"returnParameters": {
"id": 22875,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22874,
"mutability": "mutable",
"name": "role",
"nameLocation": "220:4:33",
"nodeType": "VariableDeclaration",
"scope": 22876,
"src": "212:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22873,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "212:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "211:14:33"
},
"scope": 22927,
"src": "159:67:33",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "d49d21c0",
"id": 22881,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getOracleProviderRole",
"nameLocation": "240:21:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22877,
"nodeType": "ParameterList",
"parameters": [],
"src": "261:2:33"
},
"returnParameters": {
"id": 22880,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22879,
"mutability": "mutable",
"name": "role",
"nameLocation": "294:4:33",
"nodeType": "VariableDeclaration",
"scope": 22881,
"src": "286:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22878,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "286:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "285:14:33"
},
"scope": 22927,
"src": "231:69:33",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "3ffdd2f3",
"id": 22886,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getRiskpoolKeeperRole",
"nameLocation": "314:21:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22882,
"nodeType": "ParameterList",
"parameters": [],
"src": "335:2:33"
},
"returnParameters": {
"id": 22885,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22884,
"mutability": "mutable",
"name": "role",
"nameLocation": "368:4:33",
"nodeType": "VariableDeclaration",
"scope": 22886,
"src": "360:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22883,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "360:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "359:14:33"
},
"scope": 22927,
"src": "305:69:33",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "91d14854",
"id": 22895,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "hasRole",
"nameLocation": "388:7:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22891,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22888,
"mutability": "mutable",
"name": "role",
"nameLocation": "404:4:33",
"nodeType": "VariableDeclaration",
"scope": 22895,
"src": "396:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22887,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "396:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 22890,
"mutability": "mutable",
"name": "principal",
"nameLocation": "418:9:33",
"nodeType": "VariableDeclaration",
"scope": 22895,
"src": "410:17:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22889,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "410:7:33",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "395:33:33"
},
"returnParameters": {
"id": 22894,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22893,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 22895,
"src": "451:4:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 22892,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "451:4:33",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "450:6:33"
},
"scope": 22927,
"src": "379:78:33",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "2f2ff15d",
"id": 22902,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "grantRole",
"nameLocation": "472:9:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22900,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22897,
"mutability": "mutable",
"name": "role",
"nameLocation": "490:4:33",
"nodeType": "VariableDeclaration",
"scope": 22902,
"src": "482:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22896,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "482:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 22899,
"mutability": "mutable",
"name": "principal",
"nameLocation": "504:9:33",
"nodeType": "VariableDeclaration",
"scope": 22902,
"src": "496:17:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22898,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "496:7:33",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "481:33:33"
},
"returnParameters": {
"id": 22901,
"nodeType": "ParameterList",
"parameters": [],
"src": "523:0:33"
},
"scope": 22927,
"src": "463:61:33",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "d547741f",
"id": 22909,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "revokeRole",
"nameLocation": "538:10:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22907,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22904,
"mutability": "mutable",
"name": "role",
"nameLocation": "557:4:33",
"nodeType": "VariableDeclaration",
"scope": 22909,
"src": "549:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22903,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "549:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 22906,
"mutability": "mutable",
"name": "principal",
"nameLocation": "571:9:33",
"nodeType": "VariableDeclaration",
"scope": 22909,
"src": "563:17:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22905,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "563:7:33",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "548:33:33"
},
"returnParameters": {
"id": 22908,
"nodeType": "ParameterList",
"parameters": [],
"src": "590:0:33"
},
"scope": 22927,
"src": "529:62:33",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "36568abe",
"id": 22916,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "renounceRole",
"nameLocation": "605:12:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22914,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22911,
"mutability": "mutable",
"name": "role",
"nameLocation": "626:4:33",
"nodeType": "VariableDeclaration",
"scope": 22916,
"src": "618:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22910,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "618:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 22913,
"mutability": "mutable",
"name": "principal",
"nameLocation": "640:9:33",
"nodeType": "VariableDeclaration",
"scope": 22916,
"src": "632:17:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 22912,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "632:7:33",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "617:33:33"
},
"returnParameters": {
"id": 22915,
"nodeType": "ParameterList",
"parameters": [],
"src": "659:0:33"
},
"scope": 22927,
"src": "596:64:33",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "274b02a7",
"id": 22921,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "addRole",
"nameLocation": "679:7:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22919,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22918,
"mutability": "mutable",
"name": "role",
"nameLocation": "695:4:33",
"nodeType": "VariableDeclaration",
"scope": 22921,
"src": "687:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22917,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "687:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "686:14:33"
},
"returnParameters": {
"id": 22920,
"nodeType": "ParameterList",
"parameters": [],
"src": "709:0:33"
},
"scope": 22927,
"src": "670:40:33",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "d17d0233",
"id": 22926,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "invalidateRole",
"nameLocation": "724:14:33",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22924,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 22923,
"mutability": "mutable",
"name": "role",
"nameLocation": "747:4:33",
"nodeType": "VariableDeclaration",
"scope": 22926,
"src": "739:12:33",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 22922,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "739:7:33",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "738:14:33"
},
"returnParameters": {
"id": 22925,
"nodeType": "ParameterList",
"parameters": [],
"src": "761:0:33"
},
"scope": 22927,
"src": "715:47:33",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 22928,
"src": "63:701:33"
}
],
"src": "39:726:33"
},
"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": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"type": "interface"
}