@lacchain/did
Version:
The LACChain DID Method NodeJS Implementation
1,045 lines • 589 kB
JSON
{
"fileName": "DIDRegistry.sol",
"contractName": "DIDRegistry",
"source": "//SPDX-License-Identifier: UNLICENSED\n\npragma solidity >=0.6.0 <0.7.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IDIDRegistry.sol\";\nimport \"./BaseRelayRecipient.sol\";\n\ncontract DIDRegistry is IDIDRegistry, BaseRelayRecipient {\n\n using SafeMath for uint256;\n\n mapping(address => address[]) public controllers;\n mapping(address => DIDConfig) private configs;\n mapping(address => uint) public changed;\n mapping(address => uint) public nonce;\n\n uint private minKeyRotationTime;\n\n constructor( uint _minKeyRotationTime ) public {\n minKeyRotationTime = _minKeyRotationTime;\n }\n\n modifier onlyController(address identity, address actor) {\n require(actor == identityController(identity), 'Not authorized');\n _;\n }\n\n function getControllers(address subject) public view returns (address[] memory) {\n return controllers[subject];\n }\n\n function identityController(address identity) public view returns (address) {\n uint len = controllers[identity].length;\n if (len == 0) return identity;\n if (len == 1) return controllers[identity][0];\n DIDConfig storage config = configs[identity];\n address controller = address(0);\n if( config.automaticRotation ){\n uint currentController = block.timestamp.div( config.keyRotationTime ).mod( len );\n controller = controllers[identity][currentController];\n } else {\n if( config.currentController >= len ){\n controller = controllers[identity][0];\n } else {\n controller = controllers[identity][config.currentController];\n }\n }\n if (controller != address(0)) return controller;\n return identity;\n }\n\n function checkSignature(address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, bytes32 hash) internal returns (address) {\n address signer = ecrecover(hash, sigV, sigR, sigS);\n require(signer == identityController(identity));\n nonce[signer]++;\n return signer;\n }\n\n function setCurrentController(address identity, uint index) internal {\n DIDConfig storage config = configs[identity];\n config.currentController = index;\n }\n\n function _getControllerIndex(address identity, address controller) internal view returns (int) {\n for (uint i = 0; i < controllers[identity].length; i++) {\n if (controllers[identity][i] == controller) {\n return int(i);\n }\n }\n return - 1;\n }\n\n function addController(address identity, address actor, address newController) internal onlyController(identity, actor) {\n int controllerIndex = _getControllerIndex(identity, newController);\n\n if (controllerIndex < 0) {\n if( controllers[identity].length == 0 ){\n controllers[identity].push( identity );\n }\n controllers[identity].push( newController );\n }\n }\n\n function removeController(address identity, address actor, address controller) internal onlyController(identity, actor) {\n require( controllers[identity].length > 1, 'You need at least two controllers to delete' );\n require( identityController(identity) != controller , 'Cannot delete current controller' );\n int controllerIndex = _getControllerIndex(identity, controller);\n\n require( controllerIndex >= 0, 'Controller not exist' );\n\n uint len = controllers[identity].length;\n address lastController = controllers[identity][len - 1];\n controllers[identity][uint(controllerIndex)] = lastController;\n if( lastController == identityController(identity) ){\n configs[identity].currentController = uint(controllerIndex);\n }\n delete controllers[identity][len - 1];\n controllers[identity].pop();\n }\n\n function changeController(address identity, address actor, address newController) internal onlyController(identity, actor) {\n int controllerIndex = _getControllerIndex(identity, newController);\n\n require( controllerIndex >= 0, 'Controller not exist' );\n\n if (controllerIndex >= 0) {\n setCurrentController(identity, uint(controllerIndex));\n\n emit DIDControllerChanged(identity, newController, changed[identity]);\n changed[identity] = block.number;\n }\n }\n\n function enableKeyRotation(address identity, address actor, uint keyRotationTime) internal onlyController(identity, actor) {\n require( keyRotationTime >= minKeyRotationTime, 'Invalid minimum key rotation time' );\n configs[identity].automaticRotation = true;\n configs[identity].keyRotationTime = keyRotationTime;\n }\n\n function disableKeyRotation(address identity, address actor) internal onlyController(identity, actor) {\n configs[identity].automaticRotation = false;\n }\n\n function addController(address identity, address controller) external override {\n addController(identity, _msgSender(), controller);\n }\n\n function removeController(address identity, address controller) external override {\n removeController(identity, _msgSender(), controller);\n }\n\n function changeController(address identity, address newController) external override {\n changeController(identity, _msgSender(), newController);\n }\n\n function changeControllerSigned(address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, address newController) external override {\n bytes32 hash = keccak256(abi.encodePacked(byte(0x19), byte(0), this, nonce[identityController(identity)], identity, \"changeController\", newController));\n changeController(identity, checkSignature(identity, sigV, sigR, sigS, hash), newController);\n }\n\n function setAttribute(address identity, address actor, bytes memory name, bytes memory value, uint validity) internal onlyController(identity, actor) {\n emit DIDAttributeChanged(identity, name, value, block.timestamp + validity, changed[identity]);\n changed[identity] = block.number;\n }\n\n function setAttribute(address identity, bytes memory name, bytes memory value, uint validity) external override {\n setAttribute(identity, _msgSender(), name, value, validity);\n }\n\n function setAttributeSigned(address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, bytes memory name, bytes memory value, uint validity) external override {\n bytes32 hash = keccak256(abi.encodePacked(byte(0x19), byte(0), this, nonce[identityController(identity)], identity, \"setAttribute\", name, value, validity));\n setAttribute(identity, checkSignature(identity, sigV, sigR, sigS, hash), name, value, validity);\n }\n\n function revokeAttribute(address identity, address actor, bytes memory name, bytes memory value) internal onlyController(identity, actor) {\n emit DIDAttributeChanged(identity, name, value, 0, changed[identity]);\n changed[identity] = block.number;\n }\n\n function revokeAttribute(address identity, bytes memory name, bytes memory value) external override {\n revokeAttribute(identity, _msgSender(), name, value);\n }\n\n function revokeAttributeSigned(address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, bytes memory name, bytes memory value) external override {\n bytes32 hash = keccak256(abi.encodePacked(byte(0x19), byte(0), this, nonce[identityController(identity)], identity, \"revokeAttribute\", name, value));\n revokeAttribute(identity, checkSignature(identity, sigV, sigR, sigS, hash), name, value);\n }\n\n function enableKeyRotation(address identity, uint keyRotationTime) external override {\n enableKeyRotation(identity, _msgSender(), keyRotationTime);\n }\n\n function disableKeyRotation(address identity) external override {\n disableKeyRotation(identity, _msgSender());\n }\n\n}",
"sourcePath": "contracts/DIDRegistry.sol",
"sourceMap": "162:7698:1:-:0;;;361:42:0;325:78;;;;;;;;;;;;;;;;;;;;491:104:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;569:19;548:18;:40;;;;491:104;162:7698;;;;;;",
"deployedSourceMap": "162:7698:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4885:145;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7734:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5036:151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5193:157;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5356:400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;409:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6978:169;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7568:160;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;259:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6265:435;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6071:188;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7153:409;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;364:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;756:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;886:851;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4885:145;4974:49;4988:8;4998:12;:10;:12::i;:::-;5012:10;4974:13;:49::i;:::-;4885:145;;:::o;7734:123::-;7808:42;7827:8;7837:12;:10;:12::i;:::-;7808:18;:42::i;:::-;7734:123;:::o;5036:151::-;5128:52;5145:8;5155:12;:10;:12::i;:::-;5169:10;5128:16;:52::i;:::-;5036:151;;:::o;5193:157::-;5288:55;5305:8;5315:12;:10;:12::i;:::-;5329:13;5288:16;:55::i;:::-;5193:157;;:::o;5356:400::-;5497:12;5544:4;5539:10;;5556:1;5551:7;;5560:4;5566:5;:35;5572:28;5591:8;5572:18;:28::i;:::-;5566:35;;;;;;;;;;;;;;;;5603:8;5633:13;5522:125;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5512:136;;;;;;5497:151;;5658:91;5675:8;5685:48;5700:8;5710:4;5716;5722;5728;5685:14;:48::i;:::-;5735:13;5658:16;:91::i;:::-;5356:400;;;;;;:::o;409:37::-;;;;;;;;;;;;;;;;;:::o;6978:169::-;7088:52;7104:8;7114:12;:10;:12::i;:::-;7128:4;7134:5;7088:15;:52::i;:::-;6978:169;;;:::o;7568:160::-;7663:58;7681:8;7691:12;:10;:12::i;:::-;7705:15;7663:17;:58::i;:::-;7568:160;;:::o;259:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6265:435::-;6433:12;6480:4;6475:10;;6492:1;6487:7;;6496:4;6502:5;:35;6508:28;6527:8;6508:18;:28::i;:::-;6502:35;;;;;;;;;;;;;;;;6539:8;6565:4;6571:5;6578:8;6458:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6448:140;;;;;;6433:155;;6598:95;6611:8;6621:48;6636:8;6646:4;6652;6658;6664;6621:14;:48::i;:::-;6671:4;6677:5;6684:8;6598:12;:95::i;:::-;6265:435;;;;;;;;:::o;6071:188::-;6193:59;6206:8;6216:12;:10;:12::i;:::-;6230:4;6236:5;6243:8;6193:12;:59::i;:::-;6071:188;;;;:::o;7153:409::-;7309:12;7356:4;7351:10;;7368:1;7363:7;;7372:4;7378:5;:35;7384:28;7403:8;7384:18;:28::i;:::-;7378:35;;;;;;;;;;;;;;;;7415:8;7444:4;7450:5;7334:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7324:133;;;;;;7309:148;;7467:88;7483:8;7493:48;7508:8;7518:4;7524;7530;7536;7493:14;:48::i;:::-;7543:4;7549:5;7467:15;:88::i;:::-;7153:409;;;;;;;:::o;364:39::-;;;;;;;;;;;;;;;;;:::o;756:124::-;818:16;853:11;:20;865:7;853:20;;;;;;;;;;;;;;;846:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;756:124;;;:::o;886:851::-;953:7;972:8;983:11;:21;995:8;983:21;;;;;;;;;;;;;;;:28;;;;972:39;;1032:1;1025:3;:8;1021:29;;;1042:8;1035:15;;;;;1021:29;1071:1;1064:3;:8;1060:45;;;1081:11;:21;1093:8;1081:21;;;;;;;;;;;;;;;1103:1;1081:24;;;;;;;;;;;;;;;;;;;;;;;;;1074:31;;;;;1060:45;1115:24;1142:7;:17;1150:8;1142:17;;;;;;;;;;;;;;;1115:44;;1169:18;1214:6;:24;;;;;;;;;;;;1210:439;;;1254:22;1279:56;1330:3;1279:45;1300:6;:22;;;1279:15;:19;;:45;;;;:::i;:::-;:49;;:56;;;;:::i;:::-;1254:81;;1362:11;:21;1374:8;1362:21;;;;;;;;;;;;;;;1384:17;1362:40;;;;;;;;;;;;;;;;;;;;;;;;;1349:53;;1210:439;;;;1465:3;1437:6;:24;;;:31;1433:206;;1501:11;:21;1513:8;1501:21;;;;;;;;;;;;;;;1523:1;1501:24;;;;;;;;;;;;;;;;;;;;;;;;;1488:37;;1433:206;;;1577:11;:21;1589:8;1577:21;;;;;;;;;;;;;;;1599:6;:24;;;1577:47;;;;;;;;;;;;;;;;;;;;;;;;;1564:60;;1433:206;1210:439;1684:1;1662:24;;:10;:24;;;1658:47;;1695:10;1688:17;;;;;;;1658:47;1722:8;1715:15;;;;;886:851;;;;:::o;609:248:0:-;657:14;683:24;734:16;;;;;;;;;;:21;;756:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;734:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;717:81;;;;;;827:11;816:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;809:41;;;609:248;:::o;2529:429:1:-;2632:8;2642:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2659:19:::1;2681:44;2701:8;2711:13;2681:19;:44::i;:::-;2659:66;;2758:1;2740:15;:19;2736:216;;;2811:1;2779:11;:21;2791:8;2779:21;;;;;;;;;;;;;;;:28;;;;:33;2775:110;;;2832:11;:21;2844:8;2832:21;;;;;;;;;;;;;;;2860:8;2832:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2775:110;2898:11;:21;2910:8;2898:21;;;;;;;;;;;;;;;2926:13;2898:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2736:216;742:1;2529:429:::0;;;;;:::o;4717:162::-;4802:8;4812:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4867:5:::1;4829:7;:17;4837:8;4829:17;;;;;;;;;;;;;;;:35;;;:43;;;;;;;;;;;;;;;;;;4717:162:::0;;;;:::o;2964:881::-;3067:8;3077:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3134:1:::1;3103:11:::0;:21:::1;3115:8;3103:21;;;;;;;;;;;;;;;:28;;;;:32;3094:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3235:10;3203:42;;:28;3222:8;3203:18;:28::i;:::-;:42;;;;3194:90;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;3294:19;3316:41;3336:8;3346:10;3316:19;:41::i;:::-;3294:63;;3396:1;3377:15;:20;;3368:55;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;3434:8;3445:11;:21;3457:8;3445:21;;;;;;;;;;;;;;;:28;;;;3434:39;;3483:22;3508:11;:21;3520:8;3508:21;;;;;;;;;;;;;;;3536:1;3530:3;:7;3508:30;;;;;;;;;;;;;;;;;;;;;;;;;3483:55;;3595:14;3548:11;:21;3560:8;3548:21;;;;;;;;;;;;;;;3575:15;3548:44;;;;;;;;;;;;;;;;:61;;;;;;;;;;;;;;;;;;3641:28;3660:8;3641:18;:28::i;:::-;3623:46;;:14;:46;;;3619:136;;;3728:15;3685:7;:17;3693:8;3685:17;;;;;;;;;;;;;;;:35;;:59;;;;3619:136;3771:11;:21;3783:8;3771:21;;;;;;;;;;;;;;;3799:1;3793:3;:7;3771:30;;;;;;;;;;;;;;;;3764:37;;;;;;;;;;;3811:11;:21;3823:8;3811:21;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;742:1;;;2964:881:::0;;;;;:::o;3851:516::-;3957:8;3967:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3984:19:::1;4006:44;4026:8;4036:13;4006:19;:44::i;:::-;3984:66;;4089:1;4070:15;:20;;4061:55;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;4150:1;4131:15;:20;4127:234;;4167:53;4188:8;4203:15;4167:20;:53::i;:::-;4261:8;4240:64;;;4271:13;4286:7;:17;4294:8;4286:17;;;;;;;;;;;;;;;;4240:64;;;;;;;;;;;;;;;;;;;;;;;;;;4338:12;4318:7;:17;4326:8;4318:17;;;;;;;;;;;;;;;:32;;;;4127:234;742:1;3851:516:::0;;;;;:::o;1743:295::-;1857:7;1876:14;1893:33;1903:4;1909;1915;1921;1893:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1876:50;;1954:28;1973:8;1954:18;:28::i;:::-;1944:38;;:6;:38;;;1936:47;;;;;;1993:5;:13;1999:6;1993:13;;;;;;;;;;;;;;;;:15;;;;;;;;;;;;;2025:6;2018:13;;;1743:295;;;;;;;:::o;6706:266::-;6827:8;6837:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6879:8:::1;6859:64;;;6889:4;6895:5;6902:1;6905:7;:17;6913:8;6905:17;;;;;;;;;;;;;;;;6859:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6953:12;6933:7;:17;6941:8;6933:17;;;;;;;;;;;;;;;:32;;;;6706:266:::0;;;;;;:::o;4373:338::-;4479:8;4489:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4534:18:::1;;4515:15;:37;;4506:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4639:4;4601:7;:17;4609:8;4601:17;;;;;;;;;;;;;;;:35;;;:42;;;;;;;;;;;;;;;;;;4689:15;4653:7;:17;4661:8;4653:17;;;;;;;;;;;;;;;:33;;:51;;;;4373:338:::0;;;;;:::o;5762:303::-;5895:8;5905:5;685:28;704:8;685:18;:28::i;:::-;676:37;;:5;:37;;;668:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5947:8:::1;5927:89;;;5957:4;5963:5;5988:8;5970:15;:26;5998:7;:17;6006:8;5998:17;;;;;;;;;;;;;;;;5927:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6046:12;6026:7;:17;6034:8;6026:17;;;;;;;;;;;;;;;:32;;;;5762:303:::0;;;;;;;:::o;3109:130:5:-;3167:7;3193:39;3197:1;3200;3193:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3186:46;;3109:130;;;;:::o;4444:128::-;4502:7;4528:37;4532:1;4535;4528:37;;;;;;;;;;;;;;;;;:3;:37::i;:::-;4521:44;;4444:128;;;;:::o;2222:301:1:-;2312:3;2332:6;2341:1;2332:10;;2327:170;2348:11;:21;2360:8;2348:21;;;;;;;;;;;;;;;:28;;;;2344:1;:32;2327:170;;;2429:10;2401:38;;:11;:21;2413:8;2401:21;;;;;;;;;;;;;;;2423:1;2401:24;;;;;;;;;;;;;;;;;;;;;;;;;:38;;;2397:90;;;2470:1;2459:13;;;;;2397:90;2378:3;;;;;;;2327:170;;;;2513:3;2506:10;;2222:301;;;;;:::o;2044:172::-;2123:24;2150:7;:17;2158:8;2150:17;;;;;;;;;;;;;;;2123:44;;2204:5;2177:6;:24;;:32;;;;2044:172;;;:::o;3721:272:5:-;3807:7;3838:1;3834;:5;3841:12;3826:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3864:9;3880:1;3876;:5;;;;;;3864:17;;3985:1;3978:8;;;3721:272;;;;;:::o;5043:163::-;5129:7;5161:1;5156;:6;;5164:12;5148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5198:1;5194;:5;;;;;;5187:12;;5043:163;;;;;:::o",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_minKeyRotationTime",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "name",
"type": "bytes"
},
{
"indexed": false,
"internalType": "bytes",
"name": "value",
"type": "bytes"
},
{
"indexed": false,
"internalType": "uint256",
"name": "validTo",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "previousChange",
"type": "uint256"
}
],
"name": "DIDAttributeChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "controller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "previousChange",
"type": "uint256"
}
],
"name": "DIDControllerChanged",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "address",
"name": "controller",
"type": "address"
}
],
"name": "addController",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "address",
"name": "newController",
"type": "address"
}
],
"name": "changeController",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "uint8",
"name": "sigV",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "sigR",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "sigS",
"type": "bytes32"
},
{
"internalType": "address",
"name": "newController",
"type": "address"
}
],
"name": "changeControllerSigned",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "changed",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "controllers",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
}
],
"name": "disableKeyRotation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "uint256",
"name": "keyRotationTime",
"type": "uint256"
}
],
"name": "enableKeyRotation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "subject",
"type": "address"
}
],
"name": "getControllers",
"outputs": [
{
"internalType": "address[]",
"name": "",
"type": "address[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
}
],
"name": "identityController",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "nonce",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "address",
"name": "controller",
"type": "address"
}
],
"name": "removeController",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "value",
"type": "bytes"
}
],
"name": "revokeAttribute",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "uint8",
"name": "sigV",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "sigR",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "sigS",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "value",
"type": "bytes"
}
],
"name": "revokeAttributeSigned",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "value",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "validity",
"type": "uint256"
}
],
"name": "setAttribute",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "identity",
"type": "address"
},
{
"internalType": "uint8",
"name": "sigV",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "sigR",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "sigS",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "name",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "value",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "validity",
"type": "uint256"
}
],
"name": "setAttributeSigned",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"ast": {
"absolutePath": "contracts/DIDRegistry.sol",
"exportedSymbols": {
"DIDRegistry": [
935
]
},
"id": 936,
"license": "UNLICENSED",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 37,
"literals": [
"solidity",
">=",
"0.6",
".0",
"<",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "39:31:1"
},
{
"absolutePath": "contracts/SafeMath.sol",
"file": "./SafeMath.sol",
"id": 38,
"nodeType": "ImportDirective",
"scope": 936,
"sourceUnit": 1583,
"src": "72:24:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/IDIDRegistry.sol",
"file": "./IDIDRegistry.sol",
"id": 39,
"nodeType": "ImportDirective",
"scope": 936,
"sourceUnit": 1331,
"src": "97:28:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/BaseRelayRecipient.sol",
"file": "./BaseRelayRecipient.sol",
"id": 40,
"nodeType": "ImportDirective",
"scope": 936,
"sourceUnit": 36,
"src": "126:34:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 41,
"name": "IDIDRegistry",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1330,
"src": "186:12:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IDIDRegistry_$1330",
"typeString": "contract IDIDRegistry"
}
},
"id": 42,
"nodeType": "InheritanceSpecifier",
"src": "186:12:1"
},
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 43,
"name": "BaseRelayRecipient",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 35,
"src": "200:18:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_BaseRelayRecipient_$35",
"typeString": "contract BaseRelayRecipient"
}
},
"id": 44,
"nodeType": "InheritanceSpecifier",
"src": "200:18:1"
}
],
"contractDependencies": [
35,
1330
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 935,
"linearizedBaseContracts": [
935,
35,
1330
],
"name": "DIDRegistry",
"nodeType": "ContractDefinition",
"nodes": [
{
"id": 47,
"libraryName": {
"contractScope": null,
"id": 45,
"name": "SafeMath",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1582,
"src": "232:8:1",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SafeMath_$1582",
"typeString": "library SafeMath"
}
},
"nodeType": "UsingForDirective",
"src": "226:27:1",
"typeName": {
"id": 46,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "245:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
{
"constant": false,
"functionSelector": "9478c0d1",
"id": 52,
"mutability": "mutable",
"name": "controllers",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 935,
"src": "259:48:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
"typeString": "mapping(address => address[])"
},
"typeName": {
"id": 51,
"keyType": {
"id": 48,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "267:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "259:29:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$",
"typeString": "mapping(address => address[])"
},
"valueType": {
"baseType": {
"id": 49,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "278:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 50,
"length": null,
"nodeType": "ArrayTypeName",
"src": "278:9:1",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 56,
"mutability": "mutable",
"name": "configs",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 935,
"src": "313:45:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DIDConfig_$1211_storage_$",
"typeString": "mapping(address => struct IDIDRegistry.DIDConfig)"
},
"typeName": {
"id": 55,
"keyType": {
"id": 53,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "321:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "313:29:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_struct$_DIDConfig_$1211_storage_$",
"typeString": "mapping(address => struct IDIDRegistry.DIDConfig)"
},
"valueType": {
"contractScope": null,
"id": 54,
"name": "DIDConfig",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1211,
"src": "332:9:1",
"typeDescriptions": {
"typeIdentifier": "t_struct$_DIDConfig_$1211_storage_ptr",
"typeString": "struct IDIDRegistry.DIDConfig"
}
}
},
"value": null,
"visibility": "private"
},
{
"constant": false,
"functionSelector": "f96d0f9f",
"id": 60,
"mutability": "mutable",
"name": "changed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 935,
"src": "364:39:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 59,
"keyType": {
"id": 57,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "372:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "364:24:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 58,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "383:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"functionSelector": "70ae92d2",
"id": 64,
"mutability": "mutable",
"name": "nonce",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 935,
"src": "409:37:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"typeName": {
"id": 63,
"keyType": {
"id": 61,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "417:7:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "409:24:1",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
"typeString": "mapping(address => uint256)"
},
"valueType": {
"id": 62,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "428:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 66,
"mutability": "mutable",
"name": "minKeyRotationTime",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 935,
"src": "453:31:1",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 65,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "453:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 75,
"nodeType": "Block",
"src": "538:57:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 73,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 71,
"name": "minKeyRotationTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 66,
"src": "548:18:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 72,
"name": "_minKeyRotationTime",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 68,
"src": "569:19:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "548:40:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 74,
"nodeType": "ExpressionStatement",
"src": "548:40:1"
}
]
},
"documentation": null,
"id": 76,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 69,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 68,
"mutability": "mutable",
"name": "_minKeyRotationTime",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 76,
"src": "504:24:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 67,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "504:4:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "502:28:1"
},
"returnParameters": {
"id": 70,
"nodeType": "ParameterList",
"parameters": [],
"src": "538:0:1"
},
"scope": 935,
"src": "491:104:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"body": {
"id": 92,
"nodeType": "Block",
"src": "658:92:1",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 87,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 83,
"name": "actor",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 80,
"src": "676:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 85,
"name": "identity",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 78,
"src": "704:8:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 84,
"name": "identityController",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 210,
"src": "685:18:1",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_address_$",
"typeString": "function (address) view returns (address)"
}
},
"id": 86,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "685:28:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "676:37:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "4e6f7420617574686f72697a6564",
"id": 88,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "715:16:1",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_fac3bac318c0d00994f57b0f2f4c643c313072b71db2302bf4b900309cc50b36",
"typeString": "literal_string \"Not authorized\""
},
"value": "Not authorized"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_fac3bac318c0d00994f57b0f2f4c643c313072b71db2302bf4b900309cc50b36",
"typeString": "literal_string \"Not authorized\""
}
],
"id": 82,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
-18,
-18
],
"referencedDeclaration": -18,
"src":