@etherisc/terraguard-poc-contracts
Version:
Etherisc's smart contracts for the terraguard poc
930 lines • 30 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": {
"16": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol"
},
"ast": {
"absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"exportedSymbols": {
"IAccess": [
6858
]
},
"id": 6859,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 6797,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:16"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"fullyImplemented": false,
"id": 6858,
"linearizedBaseContracts": [
6858
],
"name": "IAccess",
"nameLocation": "73:7:16",
"nodeType": "ContractDefinition",
"nodes": [
{
"functionSelector": "52a9c8d7",
"id": 6802,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getDefaultAdminRole",
"nameLocation": "96:19:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6798,
"nodeType": "ParameterList",
"parameters": [],
"src": "115:2:16"
},
"returnParameters": {
"id": 6801,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6800,
"mutability": "mutable",
"name": "role",
"nameLocation": "148:4:16",
"nodeType": "VariableDeclaration",
"scope": 6802,
"src": "140:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6799,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "140:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "139:14:16"
},
"scope": 6858,
"src": "87:67:16",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "775a4048",
"id": 6807,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getProductOwnerRole",
"nameLocation": "168:19:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6803,
"nodeType": "ParameterList",
"parameters": [],
"src": "187:2:16"
},
"returnParameters": {
"id": 6806,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6805,
"mutability": "mutable",
"name": "role",
"nameLocation": "220:4:16",
"nodeType": "VariableDeclaration",
"scope": 6807,
"src": "212:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6804,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "212:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "211:14:16"
},
"scope": 6858,
"src": "159:67:16",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "d49d21c0",
"id": 6812,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getOracleProviderRole",
"nameLocation": "240:21:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6808,
"nodeType": "ParameterList",
"parameters": [],
"src": "261:2:16"
},
"returnParameters": {
"id": 6811,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6810,
"mutability": "mutable",
"name": "role",
"nameLocation": "294:4:16",
"nodeType": "VariableDeclaration",
"scope": 6812,
"src": "286:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6809,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "286:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "285:14:16"
},
"scope": 6858,
"src": "231:69:16",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "3ffdd2f3",
"id": 6817,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getRiskpoolKeeperRole",
"nameLocation": "314:21:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6813,
"nodeType": "ParameterList",
"parameters": [],
"src": "335:2:16"
},
"returnParameters": {
"id": 6816,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6815,
"mutability": "mutable",
"name": "role",
"nameLocation": "368:4:16",
"nodeType": "VariableDeclaration",
"scope": 6817,
"src": "360:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6814,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "360:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "359:14:16"
},
"scope": 6858,
"src": "305:69:16",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "91d14854",
"id": 6826,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "hasRole",
"nameLocation": "388:7:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6822,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6819,
"mutability": "mutable",
"name": "role",
"nameLocation": "404:4:16",
"nodeType": "VariableDeclaration",
"scope": 6826,
"src": "396:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6818,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "396:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6821,
"mutability": "mutable",
"name": "principal",
"nameLocation": "418:9:16",
"nodeType": "VariableDeclaration",
"scope": 6826,
"src": "410:17:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6820,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "410:7:16",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "395:33:16"
},
"returnParameters": {
"id": 6825,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6824,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 6826,
"src": "451:4:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 6823,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "451:4:16",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "450:6:16"
},
"scope": 6858,
"src": "379:78:16",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "2f2ff15d",
"id": 6833,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "grantRole",
"nameLocation": "472:9:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6831,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6828,
"mutability": "mutable",
"name": "role",
"nameLocation": "490:4:16",
"nodeType": "VariableDeclaration",
"scope": 6833,
"src": "482:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6827,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "482:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6830,
"mutability": "mutable",
"name": "principal",
"nameLocation": "504:9:16",
"nodeType": "VariableDeclaration",
"scope": 6833,
"src": "496:17:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6829,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "496:7:16",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "481:33:16"
},
"returnParameters": {
"id": 6832,
"nodeType": "ParameterList",
"parameters": [],
"src": "523:0:16"
},
"scope": 6858,
"src": "463:61:16",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "d547741f",
"id": 6840,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "revokeRole",
"nameLocation": "538:10:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6838,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6835,
"mutability": "mutable",
"name": "role",
"nameLocation": "557:4:16",
"nodeType": "VariableDeclaration",
"scope": 6840,
"src": "549:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6834,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "549:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6837,
"mutability": "mutable",
"name": "principal",
"nameLocation": "571:9:16",
"nodeType": "VariableDeclaration",
"scope": 6840,
"src": "563:17:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6836,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "563:7:16",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "548:33:16"
},
"returnParameters": {
"id": 6839,
"nodeType": "ParameterList",
"parameters": [],
"src": "590:0:16"
},
"scope": 6858,
"src": "529:62:16",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "36568abe",
"id": 6847,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "renounceRole",
"nameLocation": "605:12:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6845,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6842,
"mutability": "mutable",
"name": "role",
"nameLocation": "626:4:16",
"nodeType": "VariableDeclaration",
"scope": 6847,
"src": "618:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6841,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "618:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 6844,
"mutability": "mutable",
"name": "principal",
"nameLocation": "640:9:16",
"nodeType": "VariableDeclaration",
"scope": 6847,
"src": "632:17:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6843,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "632:7:16",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "617:33:16"
},
"returnParameters": {
"id": 6846,
"nodeType": "ParameterList",
"parameters": [],
"src": "659:0:16"
},
"scope": 6858,
"src": "596:64:16",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "274b02a7",
"id": 6852,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "addRole",
"nameLocation": "679:7:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6850,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6849,
"mutability": "mutable",
"name": "role",
"nameLocation": "695:4:16",
"nodeType": "VariableDeclaration",
"scope": 6852,
"src": "687:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6848,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "687:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "686:14:16"
},
"returnParameters": {
"id": 6851,
"nodeType": "ParameterList",
"parameters": [],
"src": "709:0:16"
},
"scope": 6858,
"src": "670:40:16",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"functionSelector": "d17d0233",
"id": 6857,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "invalidateRole",
"nameLocation": "724:14:16",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 6855,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6854,
"mutability": "mutable",
"name": "role",
"nameLocation": "747:4:16",
"nodeType": "VariableDeclaration",
"scope": 6857,
"src": "739:12:16",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 6853,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "739:7:16",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "738:14:16"
},
"returnParameters": {
"id": 6856,
"nodeType": "ParameterList",
"parameters": [],
"src": "761:0:16"
},
"scope": 6858,
"src": "715:47:16",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 6859,
"src": "63:701:16"
}
],
"src": "39:726:16"
},
"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/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"type": "interface"
}