UNPKG

@lacchain/did

Version:

The LACChain DID Method NodeJS Implementation

1,308 lines 440 kB
{ "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\";\n\ncontract DIDRegistry is IDIDRegistry {\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));\n _;\n }\n\n function getControllers() public view returns (address[] memory) {\n return controllers[msg.sender];\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 , 'You 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, msg.sender, controller);\n }\n\n function removeController(address identity, address controller) external override {\n removeController(identity, msg.sender, controller);\n }\n\n function changeController(address identity, address newController) external override {\n changeController(identity, msg.sender, 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, msg.sender, 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, msg.sender, 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, msg.sender, keyRotationTime);\n }\n\n function disableKeyRotation(address identity) external override {\n disableKeyRotation(identity, msg.sender);\n }\n\n}", "sourcePath": "contracts/DIDRegistry.sol", "sourceMap": "127:7638:0:-:0;;;436:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;514:19;493:18;:40;;;;436:104;127:7638;;;;;;", "deployedSourceMap": "127:7638:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4804:143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7641:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4953:149;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5108:155;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5269:400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;354:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6889:167;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7477:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;204:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;683:112;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6176:435;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5984:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7062:409;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;309:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;801:851;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4804:143;4893:47;4907:8;4917:10;4929;4893:13;:47::i;:::-;4804:143;;:::o;7641:121::-;7715:40;7734:8;7744:10;7715:18;:40::i;:::-;7641:121;:::o;4953:149::-;5045:50;5062:8;5072:10;5084;5045:16;:50::i;:::-;4953:149;;:::o;5108:155::-;5203:53;5220:8;5230:10;5242:13;5203:16;:53::i;:::-;5108:155;;:::o;5269:400::-;5410:12;5457:4;5452:10;;5469:1;5464:7;;5473:4;5479:5;:35;5485:28;5504:8;5485:18;:28::i;:::-;5479:35;;;;;;;;;;;;;;;;5516:8;5546:13;5435:125;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5425:136;;;;;;5410:151;;5571:91;5588:8;5598:48;5613:8;5623:4;5629;5635;5641;5598:14;:48::i;:::-;5648:13;5571:16;:91::i;:::-;5269:400;;;;;;:::o;354:37::-;;;;;;;;;;;;;;;;;:::o;6889:167::-;6999:50;7015:8;7025:10;7037:4;7043:5;6999:15;:50::i;:::-;6889:167;;;:::o;7477:158::-;7572:56;7590:8;7600:10;7612:15;7572:17;:56::i;:::-;7477:158;;:::o;204:48::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;683:112::-;730:16;765:11;:23;777:10;765:23;;;;;;;;;;;;;;;758:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;683:112;:::o;6176:435::-;6344:12;6391:4;6386:10;;6403:1;6398:7;;6407:4;6413:5;:35;6419:28;6438:8;6419:18;:28::i;:::-;6413:35;;;;;;;;;;;;;;;;6450:8;6476:4;6482:5;6489:8;6369:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6359:140;;;;;;6344:155;;6509:95;6522:8;6532:48;6547:8;6557:4;6563;6569;6575;6532:14;:48::i;:::-;6582:4;6588:5;6595:8;6509:12;:95::i;:::-;6176:435;;;;;;;;:::o;5984:186::-;6106:57;6119:8;6129:10;6141:4;6147:5;6154:8;6106:12;:57::i;:::-;5984:186;;;;:::o;7062:409::-;7218:12;7265:4;7260:10;;7277:1;7272:7;;7281:4;7287:5;:35;7293:28;7312:8;7293:18;:28::i;:::-;7287:35;;;;;;;;;;;;;;;;7324:8;7353:4;7359:5;7243:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7233:133;;;;;;7218:148;;7376:88;7392:8;7402:48;7417:8;7427:4;7433;7439;7445;7402:14;:48::i;:::-;7452:4;7458:5;7376:15;:88::i;:::-;7062:409;;;;;;;:::o;309:39::-;;;;;;;;;;;;;;;;;:::o;801:851::-;868:7;887:8;898:11;:21;910:8;898:21;;;;;;;;;;;;;;;:28;;;;887:39;;947:1;940:3;:8;936:29;;;957:8;950:15;;;;;936:29;986:1;979:3;:8;975:45;;;996:11;:21;1008:8;996:21;;;;;;;;;;;;;;;1018:1;996:24;;;;;;;;;;;;;;;;;;;;;;;;;989:31;;;;;975:45;1030:24;1057:7;:17;1065:8;1057:17;;;;;;;;;;;;;;;1030:44;;1084:18;1129:6;:24;;;;;;;;;;;;1125:439;;;1169:22;1194:56;1245:3;1194:45;1215:6;:22;;;1194:15;:19;;:45;;;;:::i;:::-;:49;;:56;;;;:::i;:::-;1169:81;;1277:11;:21;1289:8;1277:21;;;;;;;;;;;;;;;1299:17;1277:40;;;;;;;;;;;;;;;;;;;;;;;;;1264:53;;1125:439;;;;1380:3;1352:6;:24;;;:31;1348:206;;1416:11;:21;1428:8;1416:21;;;;;;;;;;;;;;;1438:1;1416:24;;;;;;;;;;;;;;;;;;;;;;;;;1403:37;;1348:206;;;1492:11;:21;1504:8;1492:21;;;;;;;;;;;;;;;1514:6;:24;;;1492:47;;;;;;;;;;;;;;;;;;;;;;;;;1479:60;;1348:206;1125:439;1599:1;1577:24;;:10;:24;;;1573:47;;1610:10;1603:17;;;;;;;1573:47;1637:8;1630:15;;;;;801:851;;;;:::o;2444:429::-;2547:8;2557:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;2574:19:::1;2596:44;2616:8;2626:13;2596:19;:44::i;:::-;2574:66;;2673:1;2655:15;:19;2651:216;;;2726:1;2694:11:::0;:21:::1;2706:8;2694:21;;;;;;;;;;;;;;;:28;;;;:33;2690:110;;;2747:11;:21:::0;2759:8:::1;2747:21;;;;;;;;;;;;;;;2775:8;2747:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2690:110;2813:11;:21:::0;2825:8:::1;2813:21;;;;;;;;;;;;;;;2841:13;2813:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2651:216;669:1;2444:429:::0;;;;;:::o;4636:162::-;4721:8;4731:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;4786:5:::1;4748:7;:17;4756:8;4748:17;;;;;;;;;;;;;;;:35;;;:43;;;;;;;;;;;;;;;;;;4636:162:::0;;;;:::o;2879:885::-;2982:8;2992:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;3049:1:::1;3018:11;:21:::0;3030:8:::1;3018:21;;;;;;;;;;;;;;;:28;;;;:32;3009:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3150:10;3118:42;;:28;3137:8;3118:18;:28::i;:::-;:42;;;;3109:94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3213:19;3235:41;3255:8;3265:10;3235:19;:41::i;:::-;3213:63;;3315:1;3296:15;:20;;3287:55;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;3353:8;3364:11:::0;:21:::1;3376:8;3364:21;;;;;;;;;;;;;;;:28;;;;3353:39;;3402:22;3427:11:::0;:21:::1;3439:8;3427:21;;;;;;;;;;;;;;;3455:1;3449:3;:7;3427:30;;;;;;;;;;;;;;;;;;;;;;;;;3402:55;;3514:14;3467:11;:21:::0;3479:8:::1;3467:21;;;;;;;;;;;;;;;3494:15;3467:44;;;;;;;;;;;;;;;;:61;;;;;;;;;;;;;;;;;;3560:28;3579:8;3560:18;:28::i;:::-;3542:46;;:14;:46;;;3538:136;;;3647:15;3604:7;:17;3612:8;3604:17;;;;;;;;;;;;;;;:35;;:59;;;;3538:136;3690:11;:21:::0;3702:8:::1;3690:21;;;;;;;;;;;;;;;3718:1;3712:3;:7;3690:30;;;;;;;;;;;;;;;;3683:37;;;;;;;;;;;3730:11;:21:::0;3742:8:::1;3730:21;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;669:1;;;2879:885:::0;;;;;:::o;3770:516::-;3876:8;3886:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;3903:19:::1;3925:44;3945:8;3955:13;3925:19;:44::i;:::-;3903:66;;4008:1;3989:15;:20;;3980:55;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;4069:1;4050:15;:20;4046:234;;4086:53;4107:8;4122:15;4086:20;:53::i;:::-;4180:8;4159:64;;;4190:13;4205:7;:17;4213:8;4205:17;;;;;;;;;;;;;;;;4159:64;;;;;;;;;;;;;;;;;;;;;;;;;;4257:12;4237:7;:17;4245:8;4237:17;;;;;;;;;;;;;;;:32;;;;4046:234;669:1;3770:516:::0;;;;;:::o;1658:295::-;1772:7;1791:14;1808:33;1818:4;1824;1830;1836;1808:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1791:50;;1869:28;1888:8;1869:18;:28::i;:::-;1859:38;;:6;:38;;;1851:47;;;;;;1908:5;:13;1914:6;1908:13;;;;;;;;;;;;;;;;:15;;;;;;;;;;;;;1940:6;1933:13;;;1658:295;;;;;;;:::o;6617:266::-;6738:8;6748:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;6790:8:::1;6770:64;;;6800:4;6806:5;6813:1;6816:7;:17;6824:8;6816:17;;;;;;;;;;;;;;;;6770:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6864:12;6844:7;:17;6852:8;6844:17;;;;;;;;;;;;;;;:32;;;;6617:266:::0;;;;;;:::o;4292:338::-;4398:8;4408:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;4453:18:::1;;4434:15;:37;;4425:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4558:4;4520:7:::0;:17:::1;4528:8;4520:17;;;;;;;;;;;;;;;:35;;;:42;;;;;;;;;;;;;;;;;;4608:15;4572:7;:17;4580:8;4572:17;;;;;;;;;;;;;;;:33;;:51;;;;4292:338:::0;;;;;:::o;5675:303::-;5808:8;5818:5;630:28;649:8;630:18;:28::i;:::-;621:37;;:5;:37;;;613:46;;;;;;5860:8:::1;5840:89;;;5870:4;5876:5;5901:8;5883:15;:26;5911:7;:17;5919:8;5911:17;;;;;;;;;;;;;;;;5840:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5959:12;5939:7;:17;5947:8;5939:17;;;;;;;;;;;;;;;:32;;;;5675:303:::0;;;;;;;:::o;3109:130:4:-;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;2137:301:0:-;2227:3;2247:6;2256:1;2247:10;;2242:170;2263:11;:21;2275:8;2263:21;;;;;;;;;;;;;;;:28;;;;2259:1;:32;2242:170;;;2344:10;2316:38;;:11;:21;2328:8;2316:21;;;;;;;;;;;;;;;2338:1;2316:24;;;;;;;;;;;;;;;;;;;;;;;;;:38;;;2312:90;;;2385:1;2374:13;;;;;2312:90;2293:3;;;;;;;2242:170;;;;2428:3;2421:10;;2137:301;;;;;:::o;1959:172::-;2038:24;2065:7;:17;2073:8;2065:17;;;;;;;;;;;;;;;2038:44;;2119:5;2092:6;:24;;:32;;;;1959:172;;;:::o;3721:272:4:-;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": [], "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": [ 894 ] }, "id": 895, "license": "UNLICENSED", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "39:31:0" }, { "absolutePath": "contracts/SafeMath.sol", "file": "./SafeMath.sol", "id": 2, "nodeType": "ImportDirective", "scope": 895, "sourceUnit": 1539, "src": "72:24:0", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "contracts/IDIDRegistry.sol", "file": "./IDIDRegistry.sol", "id": 3, "nodeType": "ImportDirective", "scope": 895, "sourceUnit": 1290, "src": "97:28:0", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 4, "name": "IDIDRegistry", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1289, "src": "151:12:0", "typeDescriptions": { "typeIdentifier": "t_contract$_IDIDRegistry_$1289", "typeString": "contract IDIDRegistry" } }, "id": 5, "nodeType": "InheritanceSpecifier", "src": "151:12:0" } ], "contractDependencies": [ 1289 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 894, "linearizedBaseContracts": [ 894, 1289 ], "name": "DIDRegistry", "nodeType": "ContractDefinition", "nodes": [ { "id": 8, "libraryName": { "contractScope": null, "id": 6, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1538, "src": "177:8:0", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$1538", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "171:27:0", "typeName": { "id": 7, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "190:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "constant": false, "functionSelector": "9478c0d1", "id": 13, "mutability": "mutable", "name": "controllers", "nodeType": "VariableDeclaration", "overrides": null, "scope": 894, "src": "204:48:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$", "typeString": "mapping(address => address[])" }, "typeName": { "id": 12, "keyType": { "id": 9, "name": "address", "nodeType": "ElementaryTypeName", "src": "212:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "204:29:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$", "typeString": "mapping(address => address[])" }, "valueType": { "baseType": { "id": 10, "name": "address", "nodeType": "ElementaryTypeName", "src": "223:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 11, "length": null, "nodeType": "ArrayTypeName", "src": "223:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 17, "mutability": "mutable", "name": "configs", "nodeType": "VariableDeclaration", "overrides": null, "scope": 894, "src": "258:45:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DIDConfig_$1170_storage_$", "typeString": "mapping(address => struct IDIDRegistry.DIDConfig)" }, "typeName": { "id": 16, "keyType": { "id": 14, "name": "address", "nodeType": "ElementaryTypeName", "src": "266:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "258:29:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_DIDConfig_$1170_storage_$", "typeString": "mapping(address => struct IDIDRegistry.DIDConfig)" }, "valueType": { "contractScope": null, "id": 15, "name": "DIDConfig", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1170, "src": "277:9:0", "typeDescriptions": { "typeIdentifier": "t_struct$_DIDConfig_$1170_storage_ptr", "typeString": "struct IDIDRegistry.DIDConfig" } } }, "value": null, "visibility": "private" }, { "constant": false, "functionSelector": "f96d0f9f", "id": 21, "mutability": "mutable", "name": "changed", "nodeType": "VariableDeclaration", "overrides": null, "scope": 894, "src": "309:39:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 20, "keyType": { "id": 18, "name": "address", "nodeType": "ElementaryTypeName", "src": "317:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "309:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 19, "name": "uint", "nodeType": "ElementaryTypeName", "src": "328:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "70ae92d2", "id": 25, "mutability": "mutable", "name": "nonce", "nodeType": "VariableDeclaration", "overrides": null, "scope": 894, "src": "354:37:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 24, "keyType": { "id": 22, "name": "address", "nodeType": "ElementaryTypeName", "src": "362:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "354:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 23, "name": "uint", "nodeType": "ElementaryTypeName", "src": "373:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 27, "mutability": "mutable", "name": "minKeyRotationTime", "nodeType": "VariableDeclaration", "overrides": null, "scope": 894, "src": "398:31:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 26, "name": "uint", "nodeType": "ElementaryTypeName", "src": "398:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "body": { "id": 36, "nodeType": "Block", "src": "483:57:0", "statements": [ { "expression": { "argumentTypes": null, "id": 34, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 32, "name": "minKeyRotationTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 27, "src": "493:18:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 33, "name": "_minKeyRotationTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 29, "src": "514:19:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "493:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 35, "nodeType": "ExpressionStatement", "src": "493:40:0" } ] }, "documentation": null, "id": 37, "implemented": true, "kind": "constructor", "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 30, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 29, "mutability": "mutable", "name": "_minKeyRotationTime", "nodeType": "VariableDeclaration", "overrides": null, "scope": 37, "src": "449:24:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 28, "name": "uint", "nodeType": "ElementaryTypeName", "src": "449:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "447:28:0" }, "returnParameters": { "id": 31, "nodeType": "ParameterList", "parameters": [], "src": "483:0:0" }, "scope": 894, "src": "436:104:0", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "body": { "id": 52, "nodeType": "Block", "src": "603:74:0", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 48, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 44, "name": "actor", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 41, "src": "621:5:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 46, "name": "identity", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 39, "src": "649:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 45, "name": "identityController", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 169, "src": "630:18:0", "typeDescriptions": { "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_address_$", "typeString": "function (address) view returns (address)" } }, "id": 47, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "630:28:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "621:37:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 43, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ -18, -18 ], "referencedDeclaration": -18, "src": "613:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 49, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "613:46:0", "tryCall": false, "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 50, "nodeType": "ExpressionStatement", "src": "613:46:0" }, { "id": 51, "nodeType": "PlaceholderStatement", "src": "669:1:0" } ] }, "documentation": null, "id": 53, "name": "onlyController", "nodeType": "ModifierDefinition", "overrides": null, "parameters": { "id": 42, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 39, "mutability": "mutable", "name": "identity", "nodeType": "VariableDeclaration", "overrides": null, "scope": 53, "src": "570:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 38, "name": "address", "nodeType": "ElementaryTypeName", "src": "570:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 41, "mutability": "mutable", "name": "actor", "nodeType": "VariableDeclaration", "overrides": null, "scope": 53, "src": "588:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 40, "name": "address", "nodeType": "ElementaryTypeName", "src": "588:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "569:33:0" }, "src": "546:131:0", "virtual": false, "visibility": "internal" }, { "body": { "id": 64, "nodeType": "Block", "src": "748:47:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 59, "name": "controllers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "765:11:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$", "typeString": "mapping(address => address[] storage ref)" } }, "id": 62, "indexExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 60, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": -15, "src": "777:3:0", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 61, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "777:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "765:23:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "functionReturnParameters": 58, "id": 63, "nodeType": "Return", "src": "758:30:0" } ] }, "documentation": null, "functionSelector": "b4e8a6c4", "id": 65, "implemented": true, "kind": "function", "modifiers": [], "name": "getControllers", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 54, "nodeType": "ParameterList", "parameters": [], "src": "706:2:0" }, "returnParameters": { "id": 58, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 57, "mutability": "mutable", "name": "", "nodeType": "VariableDeclaration", "overrides": null, "scope": 65, "src": "730:16:0", "stateVariable": false, "storageLocation": "memory", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 55, "name": "address", "nodeType": "ElementaryTypeName", "src": "730:7:0", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 56, "length": null, "nodeType": "ArrayTypeName", "src": "730:9:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" } ], "src": "729:18:0" }, "scope": 894, "src": "683:112:0", "stateMutability": "view", "virtual": false, "visibility": "public" }, { "body": { "id": 168, "nodeType": "Block", "src": "877:775:0", "statements": [ { "assignments": [ 73 ], "declarations": [ { "constant": false, "id": 73, "mutability": "mutable", "name": "len", "nodeType": "VariableDeclaration", "overrides": null, "scope": 168, "src": "887:8:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 72, "name": "uint", "nodeType": "ElementaryTypeName", "src": "887:4:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 78, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 74, "name": "controllers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 13, "src": "898:11:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$", "typeString": "mapping(address => address[] storage ref)" } }, "id": 76, "indexExpression": { "argumentTypes": null, "id": 75, "name": "identity", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 67, "src": "910:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "898:21:0", "typeDescriptions": { "typeIdenti