@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,540 lines (1,539 loc) • 590 kB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "previousAdminRole",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "newAdminRole",
"type": "bytes32"
}
],
"name": "RoleAdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "RoleRevoked",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_ADMIN_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ORACLE_PROVIDER_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "PRODUCT_OWNER_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "RISKPOOL_KEEPER_ROLE",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "addRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getDefaultAdminRole",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getOracleProviderRole",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getProductOwnerRole",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getRiskpoolKeeperRole",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleAdmin",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "getRoleMember",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "role",
"type": "bytes32"
}
],
"name": "getRoleMemberCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"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": "address",
"name": "registry",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"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"
},
{
"inputs": [
{
"internalType": "address",
"name": "defaultAdmin",
"type": "address"
}
],
"name": "setDefaultAdminRole",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "validRole",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"allSourcePaths": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControl.sol",
"1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControlEnumerable.sol",
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControl.sol",
"21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"3": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/IAccessControlEnumerable.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"73": "contracts/modules/AccessController.sol",
"88": "contracts/shared/CoreController.sol"
},
"ast": {
"absolutePath": "contracts/modules/AccessController.sol",
"exportedSymbols": {
"AccessControl": [
18281
],
"AccessControlEnumerable": [
21875
],
"AccessController": [
4246
],
"Address": [
26374
],
"Context": [
24074
],
"CoreController": [
14924
],
"ERC165": [
26079
],
"EnumerableSet": [
19390
],
"IAccess": [
21938
],
"IAccessControl": [
26055
],
"IAccessControlEnumerable": [
27191
],
"IERC165": [
27203
],
"IRegistry": [
21750
],
"Initializable": [
18432
],
"Strings": [
23075
]
},
"id": 4247,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3989,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:73"
},
{
"absolutePath": "contracts/shared/CoreController.sol",
"file": "../shared/CoreController.sol",
"id": 3990,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4247,
"sourceUnit": 14925,
"src": "63:38:73",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"file": "@etherisc/gif-interface/contracts/modules/IAccess.sol",
"id": 3991,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4247,
"sourceUnit": 21939,
"src": "103:63:73",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/AccessControlEnumerable.sol",
"file": "@openzeppelin/contracts/access/AccessControlEnumerable.sol",
"id": 3992,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4247,
"sourceUnit": 21876,
"src": "168:68:73",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"file": "@openzeppelin/contracts/proxy/utils/Initializable.sol",
"id": 3993,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 4247,
"sourceUnit": 18433,
"src": "237:63:73",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 3994,
"name": "IAccess",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21938,
"src": "337:7:73"
},
"id": 3995,
"nodeType": "InheritanceSpecifier",
"src": "337:7:73"
},
{
"baseName": {
"id": 3996,
"name": "CoreController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 14924,
"src": "351:14:73"
},
"id": 3997,
"nodeType": "InheritanceSpecifier",
"src": "351:14:73"
},
{
"baseName": {
"id": 3998,
"name": "AccessControlEnumerable",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21875,
"src": "371:23:73"
},
"id": 3999,
"nodeType": "InheritanceSpecifier",
"src": "371:23:73"
}
],
"contractDependencies": [
14924,
18281,
18432,
21875,
21938,
24074,
26055,
26079,
27191,
27203
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 4246,
"linearizedBaseContracts": [
4246,
21875,
18281,
26079,
27203,
27191,
26055,
14924,
18432,
24074,
21938
],
"name": "AccessController",
"nameLocation": "312:16:73",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "6c137ea9",
"id": 4004,
"mutability": "constant",
"name": "PRODUCT_OWNER_ROLE",
"nameLocation": "501:18:73",
"nodeType": "VariableDeclaration",
"scope": 4246,
"src": "477:76:73",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4000,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "477:7:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"arguments": [
{
"hexValue": "50524f445543545f4f574e45525f524f4c45",
"id": 4002,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "532:20:73",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_e984cfd1d1fa34f80e24ddb2a60c8300359d79eee44555bc35c106eb020394cd",
"typeString": "literal_string \"PRODUCT_OWNER_ROLE\""
},
"value": "PRODUCT_OWNER_ROLE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_e984cfd1d1fa34f80e24ddb2a60c8300359d79eee44555bc35c106eb020394cd",
"typeString": "literal_string \"PRODUCT_OWNER_ROLE\""
}
],
"id": 4001,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "522:9:73",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 4003,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "522:31:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "79a863f5",
"id": 4009,
"mutability": "constant",
"name": "ORACLE_PROVIDER_ROLE",
"nameLocation": "658:20:73",
"nodeType": "VariableDeclaration",
"scope": 4246,
"src": "634:80:73",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4005,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "634:7:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"arguments": [
{
"hexValue": "4f5241434c455f50524f56494445525f524f4c45",
"id": 4007,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "691:22:73",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_d26b4cd59ffa91e4599f3d18b02fcd5ffb06e03216f3ee5f25f68dc75cbbbaa2",
"typeString": "literal_string \"ORACLE_PROVIDER_ROLE\""
},
"value": "ORACLE_PROVIDER_ROLE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_d26b4cd59ffa91e4599f3d18b02fcd5ffb06e03216f3ee5f25f68dc75cbbbaa2",
"typeString": "literal_string \"ORACLE_PROVIDER_ROLE\""
}
],
"id": 4006,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "681:9:73",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 4008,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "681:33:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "68232c69",
"id": 4014,
"mutability": "constant",
"name": "RISKPOOL_KEEPER_ROLE",
"nameLocation": "819:20:73",
"nodeType": "VariableDeclaration",
"scope": 4246,
"src": "795:80:73",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4010,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "795:7:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": {
"arguments": [
{
"hexValue": "5249534b504f4f4c5f4b45455045525f524f4c45",
"id": 4012,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "852:22:73",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_3c4cdb47519f2f89924ebeb1ee7a8a43b8b00120826915726460bb24576012fd",
"typeString": "literal_string \"RISKPOOL_KEEPER_ROLE\""
},
"value": "RISKPOOL_KEEPER_ROLE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_stringliteral_3c4cdb47519f2f89924ebeb1ee7a8a43b8b00120826915726460bb24576012fd",
"typeString": "literal_string \"RISKPOOL_KEEPER_ROLE\""
}
],
"id": 4011,
"name": "keccak256",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -8,
"src": "842:9:73",
"typeDescriptions": {
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
"typeString": "function (bytes memory) pure returns (bytes32)"
}
},
"id": 4013,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "842:33:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "public"
},
{
"constant": false,
"functionSelector": "12f9a85e",
"id": 4018,
"mutability": "mutable",
"name": "validRole",
"nameLocation": "914:9:73",
"nodeType": "VariableDeclaration",
"scope": 4246,
"src": "882:41:73",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"typeName": {
"id": 4017,
"keyType": {
"id": 4015,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "890:7:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "882:24:73",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
},
"valueType": {
"id": 4016,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "901:4:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"visibility": "public"
},
{
"constant": false,
"id": 4020,
"mutability": "mutable",
"name": "_defaultAdminSet",
"nameLocation": "943:16:73",
"nodeType": "VariableDeclaration",
"scope": 4246,
"src": "930:29:73",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 4019,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "930:4:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "private"
},
{
"baseFunctions": [
14898
],
"body": {
"id": 4027,
"nodeType": "Block",
"src": "1012:110:73",
"statements": [
{
"expression": {
"arguments": [],
"expression": {
"argumentTypes": [],
"id": 4024,
"name": "_populateValidRoles",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4245,
"src": "1094:19:73",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
"typeString": "function ()"
}
},
"id": 4025,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1094:21:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4026,
"nodeType": "ExpressionStatement",
"src": "1094:21:73"
}
]
},
"id": 4028,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_afterInitialize",
"nameLocation": "975:16:73",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4022,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1003:8:73"
},
"parameters": {
"id": 4021,
"nodeType": "ParameterList",
"parameters": [],
"src": "991:2:73"
},
"returnParameters": {
"id": 4023,
"nodeType": "ParameterList",
"parameters": [],
"src": "1012:0:73"
},
"scope": 4246,
"src": "966:156:73",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"baseFunctions": [
14892
],
"body": {
"id": 4036,
"nodeType": "Block",
"src": "1188:20:73",
"statements": [
{
"expression": {
"hexValue": "416363657373",
"id": 4034,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1197:8:73",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_662ef9f10158779adc6a36d83dac352a0d38be4aaefa069e4f4fdcebe6a5d3ee",
"typeString": "literal_string \"Access\""
},
"value": "Access"
},
"functionReturnParameters": 4033,
"id": 4035,
"nodeType": "Return",
"src": "1190:15:73"
}
]
},
"id": 4037,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "_getName",
"nameLocation": "1137:8:73",
"nodeType": "FunctionDefinition",
"overrides": {
"id": 4030,
"nodeType": "OverrideSpecifier",
"overrides": [],
"src": "1157:8:73"
},
"parameters": {
"id": 4029,
"nodeType": "ParameterList",
"parameters": [],
"src": "1145:2:73"
},
"returnParameters": {
"id": 4033,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4032,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 4037,
"src": "1179:7:73",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 4031,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1179:7:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1178:9:73"
},
"scope": 4246,
"src": "1128:80:73",
"stateMutability": "pure",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 4057,
"nodeType": "Block",
"src": "1493:171:73",
"statements": [
{
"expression": {
"arguments": [
{
"id": 4044,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "!",
"prefix": true,
"src": "1511:17:73",
"subExpression": {
"id": 4043,
"name": "_defaultAdminSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4020,
"src": "1512:16:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a41434c2d3030313a41444d494e5f524f4c455f414c52454144595f534554",
"id": 4045,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1530:38:73",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_9f9877d18dbbe1b61e60abbc0b78cf763130d8a58767ec78a5fe18c4bab672fb",
"typeString": "literal_string \"ERROR:ACL-001:ADMIN_ROLE_ALREADY_SET\""
},
"value": "ERROR:ACL-001:ADMIN_ROLE_ALREADY_SET"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_9f9877d18dbbe1b61e60abbc0b78cf763130d8a58767ec78a5fe18c4bab672fb",
"typeString": "literal_string \"ERROR:ACL-001:ADMIN_ROLE_ALREADY_SET\""
}
],
"id": 4042,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1503:7:73",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 4046,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1503:66:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4047,
"nodeType": "ExpressionStatement",
"src": "1503:66:73"
},
{
"expression": {
"id": 4050,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"id": 4048,
"name": "_defaultAdminSet",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4020,
"src": "1579:16:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"hexValue": "74727565",
"id": 4049,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1598:4:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1579:23:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 4051,
"nodeType": "ExpressionStatement",
"src": "1579:23:73"
},
{
"expression": {
"arguments": [
{
"id": 4053,
"name": "DEFAULT_ADMIN_ROLE",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 17989,
"src": "1624:18:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 4054,
"name": "defaultAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4039,
"src": "1644:12:73",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 4052,
"name": "_grantRole",
"nodeType": "Identifier",
"overloadedDeclarations": [
21850
],
"referencedDeclaration": 21850,
"src": "1613:10:73",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
"typeString": "function (bytes32,address)"
}
},
"id": 4055,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1613:44:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4056,
"nodeType": "ExpressionStatement",
"src": "1613:44:73"
}
]
},
"functionSelector": "c19010a7",
"id": 4058,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "setDefaultAdminRole",
"nameLocation": "1428:19:73",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 4040,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 4039,
"mutability": "mutable",
"name": "defaultAdmin",
"nameLocation": "1456:12:73",
"nodeType": "VariableDeclaration",
"scope": 4058,
"src": "1448:20:73",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4038,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1448:7:73",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1447:22:73"
},
"returnParameters": {
"id": 4041,
"nodeType": "ParameterList",
"parameters": [],
"src": "1493:0:73"
},
"scope": 4246,
"src": "1419:245:73",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"baseFunctions": [
21913,
26038
],
"body": {
"id": 4084,
"nodeType": "Block",
"src": "1896:132:73",
"statements": [
{
"expression": {
"arguments": [
{
"baseExpression": {
"id": 4071,
"name": "validRole",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4018,
"src": "1914:9:73",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$",
"typeString": "mapping(bytes32 => bool)"
}
},
"id": 4073,
"indexExpression": {
"id": 4072,
"name": "role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4060,
"src": "1924:4:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1914:15:73",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "4552524f523a41434c2d3030323a524f4c455f554e4b4e4f574e5f4f525f494e56414c4944",
"id": 4074,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1931:39:73",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_b44ca75bdc42e96be4c16ee432e64fdbf40464ed8da793481d44f5ac59f98005",
"typeString": "literal_string \"ERROR:ACL-002:ROLE_UNKNOWN_OR_INVALID\""
},
"value": "ERROR:ACL-002:ROLE_UNKNOWN_OR_INVALID"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_b44ca75bdc42e96be4c16ee432e64fdbf40464ed8da793481d44f5ac59f98005",
"typeString": "literal_string \"ERROR:ACL-002:ROLE_UNKNOWN_OR_INVALID\""
}
],
"id": 4070,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src": "1906:7:73",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 4075,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1906:65:73",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 4076,
"nodeType": "ExpressionStatement",
"src": "1906:65:73"
},
{
"expression": {
"arguments": [
{
"id": 4080,
"name": "role",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4060,
"src": "2005:4:73",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"id": 4081,
"name": "principal",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4062,
"src": "2011:9:73",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"expression": {
"id": 4077,
"name": "AccessControl",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18281,
"src": "1981:13:73",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_AccessControl_$18281_$",