UNPKG

@lacchain/did

Version:

The LACChain DID Method NodeJS Implementation

1,185 lines 245 kB
{ "fileName": "DIDRegistryRecoverable.sol", "contractName": "DIDRegistryRecoverable", "source": "//SPDX-License-Identifier: UNLICENSED\n\npragma solidity >=0.6.0 <0.7.0;\n\nimport \"./DIDRegistry.sol\";\n\ncontract DIDRegistryRecoverable is DIDRegistry {\n\n uint private maxAttempts;\n uint private minControllers;\n uint private resetSeconds;\n\n constructor(uint _minKeyRotationTime, uint _maxAttempts, uint _minControllers, uint _resetSeconds) DIDRegistry( _minKeyRotationTime ) public {\n maxAttempts = _maxAttempts;\n minControllers = _minControllers;\n resetSeconds = _resetSeconds;\n }\n\n mapping(address => address[]) public recoveredKeys;\n mapping(address => uint) public failedAttempts;\n mapping(address => uint) public lastAttempt;\n\n function recover(address identity, uint8 sigV, bytes32 sigR, bytes32 sigS, address proofController) public {\n require(controllers[identity].length >= minControllers, \"Identity must have the minimum of controllers\");\n bytes32 hash = keccak256(abi.encodePacked(byte(0x19), byte(0), this, nonce[identityController(identity)], identity, \"recover\", proofController));\n address signer = ecrecover(hash, sigV, sigR, sigS);\n require(signer == proofController, \"Invalid signature\");\n\n require(failedAttempts[identity] < maxAttempts || block.timestamp - lastAttempt[identity] > resetSeconds, \"Exceeded attempts\");\n\n if( _getControllerIndex( identity, proofController ) < 0 ) return;\n\n if( block.timestamp - lastAttempt[identity] > resetSeconds ){\n failedAttempts[identity] = 0;\n delete recoveredKeys[identity];\n }\n lastAttempt[identity] = block.timestamp;\n\n int recoveredIndex = _getRecoveredIndex(identity, proofController);\n if (recoveredIndex >= 0) {\n failedAttempts[identity] += 1;\n return;\n }\n\n recoveredKeys[identity].push(proofController);\n\n if (recoveredKeys[identity].length >= controllers[identity].length.div(2).add(1)) {\n changeController(identity, identity, proofController);\n delete recoveredKeys[identity];\n }\n }\n\n function _getRecoveredIndex(address identity, address controller) internal view returns (int) {\n for (uint i = 0; i < recoveredKeys[identity].length; i++) {\n if (recoveredKeys[identity][i] == controller) {\n return int(i);\n }\n }\n return -1;\n }\n\n}", "sourcePath": "contracts/DIDRegistryRecoverable.sol", "sourceMap": "101:2279:2:-:0;;;361:42:0;325:78;;;;;;;;;;;;;;;;;;;;250:264:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;362:19;569::1;548:18;:40;;;;491:104;415:12:2::1;401:11;:26;;;;454:15;437:14;:32;;;;494:13;479:12;:28;;;;250:264:::0;;;;101:2279;;;;;;", "deployedSourceMap": "101:2279:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4885:145:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;520:50:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;7734:123:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;678:1390:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5036:151:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;576:46:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5193:157:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5356:400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;628:43:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;409:37:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::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;520:50:2:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7734:123:1:-;7808:42;7827:8;7837:12;:10;:12::i;:::-;7808:18;:42::i;:::-;7734:123;:::o;678:1390:2:-;835:14;;803:11;:21;815:8;803:21;;;;;;;;;;;;;;;:28;;;;:46;;795:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;909:12;956:4;951:10;;968:1;963:7;;972:4;978:5;:35;984:28;1003:8;984:18;:28::i;:::-;978:35;;;;;;;;;;;;;;;;1015:8;1036:15;934:118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;924:129;;;;;;909:144;;1063:14;1080:33;1090:4;1096;1102;1108;1080:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1063:50;;1141:15;1131:25;;:6;:25;;;1123:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1224:11;;1197:14;:24;1212:8;1197:24;;;;;;;;;;;;;;;;:38;:96;;;;1281:12;;1257:11;:21;1269:8;1257:21;;;;;;;;;;;;;;;;1239:15;:39;:54;1197:96;1189:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1381:1;1330:48;1351:8;1361:15;1330:19;:48::i;:::-;:52;1326:66;;;1385:7;;;;1326:66;1447:12;;1423:11;:21;1435:8;1423:21;;;;;;;;;;;;;;;;1405:15;:39;:54;1401:157;;;1502:1;1475:14;:24;1490:8;1475:24;;;;;;;;;;;;;;;:28;;;;1524:13;:23;1538:8;1524:23;;;;;;;;;;;;;;;;1517:30;;;;:::i;:::-;1401:157;1591:15;1567:11;:21;1579:8;1567:21;;;;;;;;;;;;;;;:39;;;;1617:18;1638:45;1657:8;1667:15;1638:18;:45::i;:::-;1617:66;;1715:1;1697:14;:19;1693:99;;1760:1;1732:14;:24;1747:8;1732:24;;;;;;;;;;;;;;;;:29;;;;;;;;;;;1775:7;;;;;1693:99;1802:13;:23;1816:8;1802:23;;;;;;;;;;;;;;;1831:15;1802:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1896:42;1936:1;1896:35;1929:1;1896:11;:21;1908:8;1896:21;;;;;;;;;;;;;;;:28;;;;:32;;:35;;;;:::i;:::-;:39;;:42;;;;:::i;:::-;1862:13;:23;1876:8;1862:23;;;;;;;;;;;;;;;:30;;;;:76;1858:204;;1954:53;1971:8;1981;1991:15;1954:16;:53::i;:::-;2028:13;:23;2042:8;2028:23;;;;;;;;;;;;;;;;2021:30;;;;:::i;:::-;1858:204;678:1390;;;;;;;;;:::o;5036:151:1:-;5128:52;5145:8;5155:12;:10;:12::i;:::-;5169:10;5128:16;:52::i;:::-;5036:151;;:::o;576:46:2:-;;;;;;;;;;;;;;;;;:::o;5193:157:1:-;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;628:43:2:-;;;;;;;;;;;;;;;;;:::o;409:37:1:-;;;;;;;;;;;;;;;;;:::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;2222:301::-;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;2074:303:2:-;2163:3;2183:6;2192:1;2183:10;;2178:174;2199:13;:23;2213:8;2199:23;;;;;;;;;;;;;;;:30;;;;2195:1;:34;2178:174;;;2284:10;2254:40;;:13;:23;2268:8;2254:23;;;;;;;;;;;;;;;2278:1;2254:26;;;;;;;;;;;;;;;;;;;;;;;;;:40;;;2250:92;;;2325:1;2314:13;;;;;2250:92;2231:3;;;;;;;2178:174;;;;2368:2;2361:9;;2074:303;;;;;:::o;3109:130:5:-;3167:7;3193:39;3197:1;3200;3193:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3186:46;;3109:130;;;;:::o;882:176::-;940:7;959:9;975:1;971;:5;959:17;;999:1;994;:6;;986:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1050:1;1043:8;;;882:176;;;;:::o;3851:516:1:-;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;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;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;4444:128:5:-;4502:7;4528:37;4532:1;4535;4528:37;;;;;;;;;;;;;;;;;:3;:37::i;:::-;4521:44;;4444:128;;;;:::o;3721:272::-;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;2044:172:1:-;2123:24;2150:7;:17;2158:8;2150:17;;;;;;;;;;;;;;;2123:44;;2204:5;2177:6;:24;;:32;;;;2044:172;;;:::o;5043:163:5:-;5129:7;5161:1;5156;:6;;5164:12;5148:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5198:1;5194;:5;;;;;;5187:12;;5043:163;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;:::o", "abi": [ { "inputs": [ { "internalType": "uint256", "name": "_minKeyRotationTime", "type": "uint256" }, { "internalType": "uint256", "name": "_maxAttempts", "type": "uint256" }, { "internalType": "uint256", "name": "_minControllers", "type": "uint256" }, { "internalType": "uint256", "name": "_resetSeconds", "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": "", "type": "address" } ], "name": "failedAttempts", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "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": "lastAttempt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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": "uint8", "name": "sigV", "type": "uint8" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "address", "name": "proofController", "type": "address" } ], "name": "recover", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "recoveredKeys", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "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/DIDRegistryRecoverable.sol", "exportedSymbols": { "DIDRegistryRecoverable": [ 1202 ] }, "id": 1203, "license": "UNLICENSED", "nodeType": "SourceUnit", "nodes": [ { "id": 937, "literals": [ "solidity", ">=", "0.6", ".0", "<", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "39:31:2" }, { "absolutePath": "contracts/DIDRegistry.sol", "file": "./DIDRegistry.sol", "id": 938, "nodeType": "ImportDirective", "scope": 1203, "sourceUnit": 936, "src": "72:27:2", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 939, "name": "DIDRegistry", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 935, "src": "136:11:2", "typeDescriptions": { "typeIdentifier": "t_contract$_DIDRegistry_$935", "typeString": "contract DIDRegistry" } }, "id": 940, "nodeType": "InheritanceSpecifier", "src": "136:11:2" } ], "contractDependencies": [ 35, 935, 1330 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 1202, "linearizedBaseContracts": [ 1202, 935, 35, 1330 ], "name": "DIDRegistryRecoverable", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 942, "mutability": "mutable", "name": "maxAttempts", "nodeType": "VariableDeclaration", "overrides": null, "scope": 1202, "src": "155:24:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 941, "name": "uint", "nodeType": "ElementaryTypeName", "src": "155:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 944, "mutability": "mutable", "name": "minControllers", "nodeType": "VariableDeclaration", "overrides": null, "scope": 1202, "src": "185:27:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 943, "name": "uint", "nodeType": "ElementaryTypeName", "src": "185:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "constant": false, "id": 946, "mutability": "mutable", "name": "resetSeconds", "nodeType": "VariableDeclaration", "overrides": null, "scope": 1202, "src": "218:25:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 945, "name": "uint", "nodeType": "ElementaryTypeName", "src": "218:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "private" }, { "body": { "id": 972, "nodeType": "Block", "src": "391:123:2", "statements": [ { "expression": { "argumentTypes": null, "id": 962, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 960, "name": "maxAttempts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 942, "src": "401:11:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 961, "name": "_maxAttempts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 950, "src": "415:12:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "401:26:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 963, "nodeType": "ExpressionStatement", "src": "401:26:2" }, { "expression": { "argumentTypes": null, "id": 966, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 964, "name": "minControllers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 944, "src": "437:14:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 965, "name": "_minControllers", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 952, "src": "454:15:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "437:32:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 967, "nodeType": "ExpressionStatement", "src": "437:32:2" }, { "expression": { "argumentTypes": null, "id": 970, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 968, "name": "resetSeconds", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 946, "src": "479:12:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 969, "name": "_resetSeconds", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 954, "src": "494:13:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "479:28:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 971, "nodeType": "ExpressionStatement", "src": "479:28:2" } ] }, "documentation": null, "id": 973, "implemented": true, "kind": "constructor", "modifiers": [ { "arguments": [ { "argumentTypes": null, "id": 957, "name": "_minKeyRotationTime", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 948, "src": "362:19:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 958, "modifierName": { "argumentTypes": null, "id": 956, "name": "DIDRegistry", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 935, "src": "349:11:2", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_DIDRegistry_$935_$", "typeString": "type(contract DIDRegistry)" } }, "nodeType": "ModifierInvocation", "src": "349:34:2" } ], "name": "", "nodeType": "FunctionDefinition", "overrides": null, "parameters": { "id": 955, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 948, "mutability": "mutable", "name": "_minKeyRotationTime", "nodeType": "VariableDeclaration", "overrides": null, "scope": 973, "src": "262:24:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 947, "name": "uint", "nodeType": "ElementaryTypeName", "src": "262:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 950, "mutability": "mutable", "name": "_maxAttempts", "nodeType": "VariableDeclaration", "overrides": null, "scope": 973, "src": "288:17:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 949, "name": "uint", "nodeType": "ElementaryTypeName", "src": "288:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 952, "mutability": "mutable", "name": "_minControllers", "nodeType": "VariableDeclaration", "overrides": null, "scope": 973, "src": "307:20:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 951, "name": "uint", "nodeType": "ElementaryTypeName", "src": "307:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 954, "mutability": "mutable", "name": "_resetSeconds", "nodeType": "VariableDeclaration", "overrides": null, "scope": 973, "src": "329:18:2", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 953, "name": "uint", "nodeType": "ElementaryTypeName", "src": "329:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "261:87:2" }, "returnParameters": { "id": 959, "nodeType": "ParameterList", "parameters": [], "src": "391:0:2" }, "scope": 1202, "src": "250:264:2", "stateMutability": "nonpayable", "virtual": false, "visibility": "public" }, { "constant": false, "functionSelector": "0684e32a", "id": 978, "mutability": "mutable", "name": "recoveredKeys", "nodeType": "VariableDeclaration", "overrides": null, "scope": 1202, "src": "520:50:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$", "typeString": "mapping(address => address[])" }, "typeName": { "id": 977, "keyType": { "id": 974, "name": "address", "nodeType": "ElementaryTypeName", "src": "528:7:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "520:29:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_array$_t_address_$dyn_storage_$", "typeString": "mapping(address => address[])" }, "valueType": { "baseType": { "id": 975, "name": "address", "nodeType": "ElementaryTypeName", "src": "539:7:2", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 976, "length": null, "nodeType": "ArrayTypeName", "src": "539:9:2", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "32627ec7", "id": 982, "mutability": "mutable", "name": "failedAttempts", "nodeType": "VariableDeclaration", "overrides": null, "scope": 1202, "src": "576:46:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 981, "keyType": { "id": 979, "name": "address", "nodeType": "ElementaryTypeName", "src": "584:7:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "576:24:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 980, "name": "uint", "nodeType": "ElementaryTypeName", "src": "595:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "functionSelector": "4cd10d4b", "id": 986, "mutability": "mutable", "name": "lastAttempt", "nodeType": "VariableDeclaration", "overrides": null, "scope": 1202, "src": "628:43:2", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 985, "keyType": { "id": 983, "name": "address", "nodeType": "ElementaryTypeName", "src": "636:7:2", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "628:24:2", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 984, "name": "uint", "nodeType": "ElementaryTypeName", "src": "647:4:2", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "body": { "id": 1158, "nodeType": "Block", "src": "785:1283:2", "statements": [ { "expression": { "argumentTypes": null