build/contracts/KYC.json
{
"contractName": "KYC",
"abi": [
{
"constant": false,
"inputs": [],
"name": "renounceKYCVerifier",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "addKYCVerifier",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "isKYCVerifier",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "by",
"type": "address"
},
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCAuthorizationGranted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "by",
"type": "address"
},
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCAuthorizationReverted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCVerifierAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "account",
"type": "address"
}
],
"name": "KYCVerifierRemoved",
"type": "event"
},
{
"constant": true,
"inputs": [
{
"name": "account",
"type": "address"
}
],
"name": "kycAuthorized",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "accounts",
"type": "address[]"
}
],
"name": "grantKYCAuthorizations",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "accounts",
"type": "address[]"
}
],
"name": "revertKYCAuthorizations",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405261001c33610021640100000000026401000000009004565b6101db565b61004281600061008864010000000002610938179091906401000000009004565b8073ffffffffffffffffffffffffffffffffffffffff167f5565480284cbd6151ab5813b9bd9e9b3f9e0e7d2a3a8110e0ca9b24ca819dc0160405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156100c457600080fd5b6100dd8282610147640100000000026401000000009004565b1515156100e957600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561018457600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610a14806101ea6000396000f3fe608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318e6010f1461007d57806334ce5d2d1461009457806342a14d1f146100e5578063696eee511461014e578063b3449bbc146101b7578063b3b5e6ea1461027c575b600080fd5b34801561008957600080fd5b50610092610341565b005b3480156100a057600080fd5b506100e3600480360360208110156100b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061034c565b005b3480156100f157600080fd5b506101346004803603602081101561010857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b34801561015a57600080fd5b5061019d6004803603602081101561017157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061042b565b604051808215151515815260200191505060405180910390f35b3480156101c357600080fd5b5061027a600480360360208110156101da57600080fd5b81019080803590602001906401000000008111156101f757600080fd5b82018360208201111561020957600080fd5b8035906020019184602083028401116401000000008311171561022b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610448565b005b34801561028857600080fd5b5061033f6004803603602081101561029f57600080fd5b81019080803590602001906401000000008111156102bc57600080fd5b8201836020820111156102ce57600080fd5b803590602001918460208302840111640100000000831117156102f057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506105c4565b005b61034a33610741565b565b6103553361042b565b15156103c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b6103d28161079b565b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60006104418260006107f590919063ffffffff16565b9050919050565b6104513361042b565b15156104c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b81518110156105c057600180600084848151811015156104e757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550818181518110151561055057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c185685ceb03e9a8983900153554b9ec01ee854b55b319ee0563515a01bbdc760405160405180910390a380806001019150506104cb565b5050565b6105cd3361042b565b1515610641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b815181101561073d57600060016000848481518110151561066457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555081818151811015156106cd57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f020398f502fe64d86a50ec8fc67611cfe4a6a14aeeec2f6bc0962aba5a03af5160405160405180910390a38080600101915050610647565b5050565b61075581600061088990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f84fda749cd5d78392088aeddee30341ef789376b68e94319eff31cb54d561ef060405160405180910390a250565b6107af81600061093890919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f5565480284cbd6151ab5813b9bd9e9b3f9e0e7d2a3a8110e0ca9b24ca819dc0160405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561083257600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156108c557600080fd5b6108cf82826107f5565b15156108da57600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561097457600080fd5b61097e82826107f5565b15151561098a57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505056fea165627a7a72305820680a709bb116e6a6e8d5e3e66189ce8efa89b0024c9d0f009100ffa6155585ef0029",
"deployedBytecode": "0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806318e6010f1461007d57806334ce5d2d1461009457806342a14d1f146100e5578063696eee511461014e578063b3449bbc146101b7578063b3b5e6ea1461027c575b600080fd5b34801561008957600080fd5b50610092610341565b005b3480156100a057600080fd5b506100e3600480360360208110156100b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061034c565b005b3480156100f157600080fd5b506101346004803603602081101561010857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d5565b604051808215151515815260200191505060405180910390f35b34801561015a57600080fd5b5061019d6004803603602081101561017157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061042b565b604051808215151515815260200191505060405180910390f35b3480156101c357600080fd5b5061027a600480360360208110156101da57600080fd5b81019080803590602001906401000000008111156101f757600080fd5b82018360208201111561020957600080fd5b8035906020019184602083028401116401000000008311171561022b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610448565b005b34801561028857600080fd5b5061033f6004803603602081101561029f57600080fd5b81019080803590602001906401000000008111156102bc57600080fd5b8201836020820111156102ce57600080fd5b803590602001918460208302840111640100000000831117156102f057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506105c4565b005b61034a33610741565b565b6103553361042b565b15156103c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b6103d28161079b565b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60006104418260006107f590919063ffffffff16565b9050919050565b6104513361042b565b15156104c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b81518110156105c057600180600084848151811015156104e757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550818181518110151561055057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c185685ceb03e9a8983900153554b9ec01ee854b55b319ee0563515a01bbdc760405160405180910390a380806001019150506104cb565b5050565b6105cd3361042b565b1515610641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f6d757374206265204b594320766572696669657200000000000000000000000081525060200191505060405180910390fd5b60008090505b815181101561073d57600060016000848481518110151561066457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555081818151811015156106cd57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f020398f502fe64d86a50ec8fc67611cfe4a6a14aeeec2f6bc0962aba5a03af5160405160405180910390a38080600101915050610647565b5050565b61075581600061088990919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f84fda749cd5d78392088aeddee30341ef789376b68e94319eff31cb54d561ef060405160405180910390a250565b6107af81600061093890919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f5565480284cbd6151ab5813b9bd9e9b3f9e0e7d2a3a8110e0ca9b24ca819dc0160405160405180910390a250565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561083257600080fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156108c557600080fd5b6108cf82826107f5565b15156108da57600080fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561097457600080fd5b61097e82826107f5565b15151561098a57600080fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505056fea165627a7a72305820680a709bb116e6a6e8d5e3e66189ce8efa89b0024c9d0f009100ffa6155585ef0029",
"sourceMap": "351:1419:11:-;;;329:27:12;345:10;329:15;;;:27;;;:::i;:::-;351:1419:11;;812:133:12;873:25;890:7;873:12;:16;;;;;;:25;;;;;:::i;:::-;930:7;913:25;;;;;;;;;;;;812:133;:::o;259:181:13:-;354:1;335:21;;:7;:21;;;;327:30;;;;;;;;376:18;380:4;386:7;376:3;;;:18;;;:::i;:::-;375:19;367:28;;;;;;;;429:4;406;:11;;:20;418:7;406:20;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;259:181;;:::o;786:162::-;858:4;901:1;882:21;;:7;:21;;;;874:30;;;;;;;;921:4;:11;;:20;933:7;921:20;;;;;;;;;;;;;;;;;;;;;;;;;914:27;;786:162;;;;:::o;351:1419:11:-;;;;;;;",
"deployedSourceMap": "351:1419:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;721:85:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;721:85:12;;;;;;610:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;610:105:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;610:105:12;;;;;;;;;;;;;;;;;;;;;;685:119:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;685:119:11;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;685:119:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;488:116:12;;8:9:-1;5:2;;;30:1;27;20:12;5:2;488:116:12;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;488:116:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;973:310:11;;8:9:-1;5:2;;;30:1;27;20:12;5:2;973:310:11;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;973:310:11;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;973:310:11;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;973:310:11;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;973:310:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;973:310:11;;;;;;;;;;;;;;;;;;1455:313;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1455:313:11;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1455:313:11;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1455:313:11;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1455:313:11;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1455:313:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1455:313:11;;;;;;;;;;;;;;;;;;721:85:12;769:30;788:10;769:18;:30::i;:::-;721:85::o;610:105::-;414:25;428:10;414:13;:25::i;:::-;406:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;684:24;700:7;684:15;:24::i;:::-;610:105;:::o;685:119:11:-;746:4;769:19;:28;789:7;769:28;;;;;;;;;;;;;;;;;;;;;;;;;762:35;;685:119;;;:::o;488:116:12:-;549:4;572:25;589:7;572:12;:16;;:25;;;;:::i;:::-;565:32;;488:116;;;:::o;973:310:11:-;414:25:12;428:10;414:13;:25::i;:::-;406:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1104:9:11;1116:1;1104:13;;1099:178;1123:8;:15;1119:1;:19;1099:178;;;1195:4;1160:19;:32;1180:8;1189:1;1180:11;;;;;;;;;;;;;;;;;;1160:32;;;;;;;;;;;;;;;;:39;;;;;;;;;;;;;;;;;;1254:8;1263:1;1254:11;;;;;;;;;;;;;;;;;;1218:48;;1242:10;1218:48;;;;;;;;;;;;1141:3;;;;;;;1099:178;;;;973:310;:::o;1455:313::-;414:25:12;428:10;414:13;:25::i;:::-;406:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1587:9:11;1599:1;1587:13;;1582:180;1606:8;:15;1602:1;:19;1582:180;;;1678:5;1643:19;:32;1663:8;1672:1;1663:11;;;;;;;;;;;;;;;;;;1643:32;;;;;;;;;;;;;;;;:40;;;;;;;;;;;;;;;;;;1739:8;1748:1;1739:11;;;;;;;;;;;;;;;;;;1702:49;;1727:10;1702:49;;;;;;;;;;;;1624:3;;;;;;;1582:180;;;;1455:313;:::o;951:141:12:-;1015:28;1035:7;1015:12;:19;;:28;;;;:::i;:::-;1077:7;1058:27;;;;;;;;;;;;951:141;:::o;812:133::-;873:25;890:7;873:12;:16;;:25;;;;:::i;:::-;930:7;913:25;;;;;;;;;;;;812:133;:::o;786:162:13:-;858:4;901:1;882:21;;:7;:21;;;;874:30;;;;;;;;921:4;:11;;:20;933:7;921:20;;;;;;;;;;;;;;;;;;;;;;;;;914:27;;786:162;;;;:::o;514:184::-;612:1;593:21;;:7;:21;;;;585:30;;;;;;;;633:18;637:4;643:7;633:3;:18::i;:::-;625:27;;;;;;;;686:5;663:4;:11;;:20;675:7;663:20;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;;;;;514:184;;:::o;259:181::-;354:1;335:21;;:7;:21;;;;327:30;;;;;;;;376:18;380:4;386:7;376:3;:18::i;:::-;375:19;367:28;;;;;;;;429:4;406;:11;;:20;418:7;406:20;;;;;;;;;;;;;;;;:27;;;;;;;;;;;;;;;;;;259:181;;:::o",
"source": "pragma solidity ^0.5.0;\n\nimport \"./KYCVerifierRole.sol\";\n\n/**\n * @title KYC\n * @dev Implements a list of accounts that have been reviewed and authorized\n * after a KYC process.. Since it is less critical than owning the contract,\n * the role of KYC can be accomplished by several addresses, which is\n * implemented using a custom KYCVerifierRole.\n */\ncontract KYC is KYCVerifierRole {\n\n event KYCAuthorizationGranted(address indexed by, address indexed account);\n event KYCAuthorizationReverted(address indexed by, address indexed account);\n\n mapping(address => bool) private _authorizedAccounts;\n\n /**\n * @return true if `account` has been KYC authorized.\n */\n function kycAuthorized(address account) public view returns (bool) {\n return _authorizedAccounts[account];\n }\n\n /**\n * @dev Allows a KYC verifier to grant KYC authorization to accounts.\n * @param accounts Array of addresses that have been KYC authorized.\n */\n function grantKYCAuthorizations(\n address[] memory accounts\n )\n public\n onlyKYCVerifier\n {\n for (uint256 i = 0; i < accounts.length ; i++) {\n _authorizedAccounts[accounts[i]] = true;\n emit KYCAuthorizationGranted(msg.sender, accounts[i]);\n }\n }\n\n /**\n * @dev Allows a KYC verifier to revert previous KYC authorization to accounts.\n * @param accounts The addresses that have been KYC reverted.\n */\n function revertKYCAuthorizations(\n address[] memory accounts\n )\n public\n onlyKYCVerifier\n {\n for (uint256 i = 0; i < accounts.length ; i++) {\n _authorizedAccounts[accounts[i]] = false;\n emit KYCAuthorizationReverted(msg.sender, accounts[i]);\n }\n }\n}\n",
"sourcePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYC.sol",
"ast": {
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYC.sol",
"exportedSymbols": {
"KYC": [
1597
]
},
"id": 1598,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1489,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:11"
},
{
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYCVerifierRole.sol",
"file": "./KYCVerifierRole.sol",
"id": 1490,
"nodeType": "ImportDirective",
"scope": 1598,
"sourceUnit": 1702,
"src": "25:31:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1491,
"name": "KYCVerifierRole",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1701,
"src": "367:15:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_KYCVerifierRole_$1701",
"typeString": "contract KYCVerifierRole"
}
},
"id": 1492,
"nodeType": "InheritanceSpecifier",
"src": "367:15:11"
}
],
"contractDependencies": [
1701
],
"contractKind": "contract",
"documentation": "@title KYC\n@dev Implements a list of accounts that have been reviewed and authorized\nafter a KYC process.. Since it is less critical than owning the contract,\nthe role of KYC can be accomplished by several addresses, which is\nimplemented using a custom KYCVerifierRole.",
"fullyImplemented": true,
"id": 1597,
"linearizedBaseContracts": [
1597,
1701
],
"name": "KYC",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 1498,
"name": "KYCAuthorizationGranted",
"nodeType": "EventDefinition",
"parameters": {
"id": 1497,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1494,
"indexed": true,
"name": "by",
"nodeType": "VariableDeclaration",
"scope": 1498,
"src": "420:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1493,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "420:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1496,
"indexed": true,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1498,
"src": "440:23:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1495,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "440:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "419:45:11"
},
"src": "390:75:11"
},
{
"anonymous": false,
"documentation": null,
"id": 1504,
"name": "KYCAuthorizationReverted",
"nodeType": "EventDefinition",
"parameters": {
"id": 1503,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1500,
"indexed": true,
"name": "by",
"nodeType": "VariableDeclaration",
"scope": 1504,
"src": "501:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1499,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "501:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1502,
"indexed": true,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1504,
"src": "521:23:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1501,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "521:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "500:45:11"
},
"src": "470:76:11"
},
{
"constant": false,
"id": 1508,
"name": "_authorizedAccounts",
"nodeType": "VariableDeclaration",
"scope": 1597,
"src": "552:52:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 1507,
"keyType": {
"id": 1505,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "560:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "552:24:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 1506,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "571:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 1519,
"nodeType": "Block",
"src": "752:52:11",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1515,
"name": "_authorizedAccounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1508,
"src": "769:19:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1517,
"indexExpression": {
"argumentTypes": null,
"id": 1516,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1510,
"src": "789:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "769:28:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1514,
"id": 1518,
"nodeType": "Return",
"src": "762:35:11"
}
]
},
"documentation": "@return true if `account` has been KYC authorized.",
"id": 1520,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "kycAuthorized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1511,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1510,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1520,
"src": "708:15:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1509,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "708:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "707:17:11"
},
"returnParameters": {
"id": 1514,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1513,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1520,
"src": "746:4:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1512,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "746:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "745:6:11"
},
"scope": 1597,
"src": "685:119:11",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1557,
"nodeType": "Block",
"src": "1089:194:11",
"statements": [
{
"body": {
"id": 1555,
"nodeType": "Block",
"src": "1146:131:11",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1539,
"name": "_authorizedAccounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1508,
"src": "1160:19:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1543,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1540,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "1180:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1542,
"indexExpression": {
"argumentTypes": null,
"id": 1541,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1189:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1180:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1160:32:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1544,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1195:4:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1160:39:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1546,
"nodeType": "ExpressionStatement",
"src": "1160:39:11"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1548,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "1242:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1242:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1550,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "1254:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1552,
"indexExpression": {
"argumentTypes": null,
"id": 1551,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1263:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1254:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1547,
"name": "KYCAuthorizationGranted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1498,
"src": "1218:23:11",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 1553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1218:48:11",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1554,
"nodeType": "EmitStatement",
"src": "1213:53:11"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1532,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1119:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1533,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "1123:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1123:15:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1119:19:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1556,
"initializationExpression": {
"assignments": [
1529
],
"declarations": [
{
"constant": false,
"id": 1529,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1556,
"src": "1104:9:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1528,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1104:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1531,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1530,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1116:1:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1104:13:11"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1141:3:11",
"subExpression": {
"argumentTypes": null,
"id": 1536,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1141:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1538,
"nodeType": "ExpressionStatement",
"src": "1141:3:11"
},
"nodeType": "ForStatement",
"src": "1099:178:11"
}
]
},
"documentation": "@dev Allows a KYC verifier to grant KYC authorization to accounts.\n@param accounts Array of addresses that have been KYC authorized.",
"id": 1558,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1526,
"modifierName": {
"argumentTypes": null,
"id": 1525,
"name": "onlyKYCVerifier",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "1069:15:11",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1069:15:11"
}
],
"name": "grantKYCAuthorizations",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1524,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1523,
"name": "accounts",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "1014:25:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1521,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1014:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1522,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1014:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1004:41:11"
},
"returnParameters": {
"id": 1527,
"nodeType": "ParameterList",
"parameters": [],
"src": "1089:0:11"
},
"scope": 1597,
"src": "973:310:11",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1595,
"nodeType": "Block",
"src": "1572:196:11",
"statements": [
{
"body": {
"id": 1593,
"nodeType": "Block",
"src": "1629:133:11",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1583,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1577,
"name": "_authorizedAccounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1508,
"src": "1643:19:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1581,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1578,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1561,
"src": "1663:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1580,
"indexExpression": {
"argumentTypes": null,
"id": 1579,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1672:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1663:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1643:32:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1582,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1678:5:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "1643:40:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1584,
"nodeType": "ExpressionStatement",
"src": "1643:40:11"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1586,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "1727:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1727:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1588,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1561,
"src": "1739:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1590,
"indexExpression": {
"argumentTypes": null,
"id": 1589,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1748:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1739:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1585,
"name": "KYCAuthorizationReverted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1504,
"src": "1702:24:11",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 1591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1702:49:11",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1592,
"nodeType": "EmitStatement",
"src": "1697:54:11"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1573,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1570,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1602:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1571,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1561,
"src": "1606:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1572,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1606:15:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1602:19:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1594,
"initializationExpression": {
"assignments": [
1567
],
"declarations": [
{
"constant": false,
"id": 1567,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1594,
"src": "1587:9:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1566,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1587:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1569,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1599:1:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1587:13:11"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1575,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1624:3:11",
"subExpression": {
"argumentTypes": null,
"id": 1574,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1624:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1576,
"nodeType": "ExpressionStatement",
"src": "1624:3:11"
},
"nodeType": "ForStatement",
"src": "1582:180:11"
}
]
},
"documentation": "@dev Allows a KYC verifier to revert previous KYC authorization to accounts.\n@param accounts The addresses that have been KYC reverted.",
"id": 1596,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1564,
"modifierName": {
"argumentTypes": null,
"id": 1563,
"name": "onlyKYCVerifier",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "1552:15:11",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1552:15:11"
}
],
"name": "revertKYCAuthorizations",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1562,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1561,
"name": "accounts",
"nodeType": "VariableDeclaration",
"scope": 1596,
"src": "1497:25:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1559,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1497:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1560,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1497:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1487:41:11"
},
"returnParameters": {
"id": 1565,
"nodeType": "ParameterList",
"parameters": [],
"src": "1572:0:11"
},
"scope": 1597,
"src": "1455:313:11",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1598,
"src": "351:1419:11"
}
],
"src": "0:1771:11"
},
"legacyAST": {
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYC.sol",
"exportedSymbols": {
"KYC": [
1597
]
},
"id": 1598,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1489,
"literals": [
"solidity",
"^",
"0.5",
".0"
],
"nodeType": "PragmaDirective",
"src": "0:23:11"
},
{
"absolutePath": "/Users/thomasvanderstraeten/code/hey/mainchain/contracts/utils/KYCVerifierRole.sol",
"file": "./KYCVerifierRole.sol",
"id": 1490,
"nodeType": "ImportDirective",
"scope": 1598,
"sourceUnit": 1702,
"src": "25:31:11",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1491,
"name": "KYCVerifierRole",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1701,
"src": "367:15:11",
"typeDescriptions": {
"typeIdentifier": "t_contract$_KYCVerifierRole_$1701",
"typeString": "contract KYCVerifierRole"
}
},
"id": 1492,
"nodeType": "InheritanceSpecifier",
"src": "367:15:11"
}
],
"contractDependencies": [
1701
],
"contractKind": "contract",
"documentation": "@title KYC\n@dev Implements a list of accounts that have been reviewed and authorized\nafter a KYC process.. Since it is less critical than owning the contract,\nthe role of KYC can be accomplished by several addresses, which is\nimplemented using a custom KYCVerifierRole.",
"fullyImplemented": true,
"id": 1597,
"linearizedBaseContracts": [
1597,
1701
],
"name": "KYC",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": null,
"id": 1498,
"name": "KYCAuthorizationGranted",
"nodeType": "EventDefinition",
"parameters": {
"id": 1497,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1494,
"indexed": true,
"name": "by",
"nodeType": "VariableDeclaration",
"scope": 1498,
"src": "420:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1493,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "420:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1496,
"indexed": true,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1498,
"src": "440:23:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1495,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "440:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "419:45:11"
},
"src": "390:75:11"
},
{
"anonymous": false,
"documentation": null,
"id": 1504,
"name": "KYCAuthorizationReverted",
"nodeType": "EventDefinition",
"parameters": {
"id": 1503,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1500,
"indexed": true,
"name": "by",
"nodeType": "VariableDeclaration",
"scope": 1504,
"src": "501:18:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1499,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "501:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1502,
"indexed": true,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1504,
"src": "521:23:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1501,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "521:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "500:45:11"
},
"src": "470:76:11"
},
{
"constant": false,
"id": 1508,
"name": "_authorizedAccounts",
"nodeType": "VariableDeclaration",
"scope": 1597,
"src": "552:52:11",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"typeName": {
"id": 1507,
"keyType": {
"id": 1505,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "560:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Mapping",
"src": "552:24:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
},
"valueType": {
"id": 1506,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "571:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
},
"value": null,
"visibility": "private"
},
{
"body": {
"id": 1519,
"nodeType": "Block",
"src": "752:52:11",
"statements": [
{
"expression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1515,
"name": "_authorizedAccounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1508,
"src": "769:19:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1517,
"indexExpression": {
"argumentTypes": null,
"id": 1516,
"name": "account",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1510,
"src": "789:7:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "769:28:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"functionReturnParameters": 1514,
"id": 1518,
"nodeType": "Return",
"src": "762:35:11"
}
]
},
"documentation": "@return true if `account` has been KYC authorized.",
"id": 1520,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "kycAuthorized",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1511,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1510,
"name": "account",
"nodeType": "VariableDeclaration",
"scope": 1520,
"src": "708:15:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1509,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "708:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "707:17:11"
},
"returnParameters": {
"id": 1514,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1513,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1520,
"src": "746:4:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1512,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "746:4:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "745:6:11"
},
"scope": 1597,
"src": "685:119:11",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1557,
"nodeType": "Block",
"src": "1089:194:11",
"statements": [
{
"body": {
"id": 1555,
"nodeType": "Block",
"src": "1146:131:11",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1545,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1539,
"name": "_authorizedAccounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1508,
"src": "1160:19:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1543,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1540,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "1180:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1542,
"indexExpression": {
"argumentTypes": null,
"id": 1541,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1189:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1180:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1160:32:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "74727565",
"id": 1544,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1195:4:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "true"
},
"src": "1160:39:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1546,
"nodeType": "ExpressionStatement",
"src": "1160:39:11"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1548,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "1242:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1549,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1242:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1550,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "1254:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1552,
"indexExpression": {
"argumentTypes": null,
"id": 1551,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1263:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1254:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1547,
"name": "KYCAuthorizationGranted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1498,
"src": "1218:23:11",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 1553,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1218:48:11",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1554,
"nodeType": "EmitStatement",
"src": "1213:53:11"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1532,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1119:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1533,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1523,
"src": "1123:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1534,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1123:15:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1119:19:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1556,
"initializationExpression": {
"assignments": [
1529
],
"declarations": [
{
"constant": false,
"id": 1529,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1556,
"src": "1104:9:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1528,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1104:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1531,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1530,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1116:1:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1104:13:11"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1141:3:11",
"subExpression": {
"argumentTypes": null,
"id": 1536,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1529,
"src": "1141:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1538,
"nodeType": "ExpressionStatement",
"src": "1141:3:11"
},
"nodeType": "ForStatement",
"src": "1099:178:11"
}
]
},
"documentation": "@dev Allows a KYC verifier to grant KYC authorization to accounts.\n@param accounts Array of addresses that have been KYC authorized.",
"id": 1558,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1526,
"modifierName": {
"argumentTypes": null,
"id": 1525,
"name": "onlyKYCVerifier",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "1069:15:11",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1069:15:11"
}
],
"name": "grantKYCAuthorizations",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1524,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1523,
"name": "accounts",
"nodeType": "VariableDeclaration",
"scope": 1558,
"src": "1014:25:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1521,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1014:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1522,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1014:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1004:41:11"
},
"returnParameters": {
"id": 1527,
"nodeType": "ParameterList",
"parameters": [],
"src": "1089:0:11"
},
"scope": 1597,
"src": "973:310:11",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"id": 1595,
"nodeType": "Block",
"src": "1572:196:11",
"statements": [
{
"body": {
"id": 1593,
"nodeType": "Block",
"src": "1629:133:11",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1583,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1577,
"name": "_authorizedAccounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1508,
"src": "1643:19:11",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
"typeString": "mapping(address => bool)"
}
},
"id": 1581,
"indexExpression": {
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1578,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1561,
"src": "1663:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1580,
"indexExpression": {
"argumentTypes": null,
"id": 1579,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1672:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1663:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": true,
"nodeType": "IndexAccess",
"src": "1643:32:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"hexValue": "66616c7365",
"id": 1582,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "bool",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1678:5:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"value": "false"
},
"src": "1643:40:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1584,
"nodeType": "ExpressionStatement",
"src": "1643:40:11"
},
{
"eventCall": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1586,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3404,
"src": "1727:3:11",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 1587,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1727:10:11",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"argumentTypes": null,
"baseExpression": {
"argumentTypes": null,
"id": 1588,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1561,
"src": "1739:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1590,
"indexExpression": {
"argumentTypes": null,
"id": 1589,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1748:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"isConstant": false,
"isLValue": true,
"isPure": false,
"lValueRequested": false,
"nodeType": "IndexAccess",
"src": "1739:11:11",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 1585,
"name": "KYCAuthorizationReverted",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1504,
"src": "1702:24:11",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$",
"typeString": "function (address,address)"
}
},
"id": 1591,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1702:49:11",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 1592,
"nodeType": "EmitStatement",
"src": "1697:54:11"
}
]
},
"condition": {
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 1573,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 1570,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1602:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "<",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 1571,
"name": "accounts",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1561,
"src": "1606:8:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[] memory"
}
},
"id": 1572,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "length",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1606:15:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "1602:19:11",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"id": 1594,
"initializationExpression": {
"assignments": [
1567
],
"declarations": [
{
"constant": false,
"id": 1567,
"name": "i",
"nodeType": "VariableDeclaration",
"scope": 1594,
"src": "1587:9:11",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1566,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1587:7:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"id": 1569,
"initialValue": {
"argumentTypes": null,
"hexValue": "30",
"id": 1568,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1599:1:11",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"nodeType": "VariableDeclarationStatement",
"src": "1587:13:11"
},
"loopExpression": {
"expression": {
"argumentTypes": null,
"id": 1575,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "UnaryOperation",
"operator": "++",
"prefix": false,
"src": "1624:3:11",
"subExpression": {
"argumentTypes": null,
"id": 1574,
"name": "i",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1567,
"src": "1624:1:11",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1576,
"nodeType": "ExpressionStatement",
"src": "1624:3:11"
},
"nodeType": "ForStatement",
"src": "1582:180:11"
}
]
},
"documentation": "@dev Allows a KYC verifier to revert previous KYC authorization to accounts.\n@param accounts The addresses that have been KYC reverted.",
"id": 1596,
"implemented": true,
"kind": "function",
"modifiers": [
{
"arguments": null,
"id": 1564,
"modifierName": {
"argumentTypes": null,
"id": 1563,
"name": "onlyKYCVerifier",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1634,
"src": "1552:15:11",
"typeDescriptions": {
"typeIdentifier": "t_modifier$__$",
"typeString": "modifier ()"
}
},
"nodeType": "ModifierInvocation",
"src": "1552:15:11"
}
],
"name": "revertKYCAuthorizations",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1562,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1561,
"name": "accounts",
"nodeType": "VariableDeclaration",
"scope": 1596,
"src": "1497:25:11",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
"typeString": "address[]"
},
"typeName": {
"baseType": {
"id": 1559,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1497:7:11",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1560,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1497:9:11",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
"typeString": "address[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1487:41:11"
},
"returnParameters": {
"id": 1565,
"nodeType": "ParameterList",
"parameters": [],
"src": "1572:0:11"
},
"scope": 1597,
"src": "1455:313:11",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1598,
"src": "351:1419:11"
}
],
"src": "0:1771:11"
},
"compiler": {
"name": "solc",
"version": "0.5.0+commit.1d4f565a.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.2",
"updatedAt": "2019-02-28T09:44:08.688Z",
"devdoc": {
"details": "Implements a list of accounts that have been reviewed and authorized after a KYC process.. Since it is less critical than owning the contract, the role of KYC can be accomplished by several addresses, which is implemented using a custom KYCVerifierRole.",
"methods": {
"grantKYCAuthorizations(address[])": {
"details": "Allows a KYC verifier to grant KYC authorization to accounts.",
"params": {
"accounts": "Array of addresses that have been KYC authorized."
}
},
"kycAuthorized(address)": {
"return": "true if `account` has been KYC authorized."
},
"revertKYCAuthorizations(address[])": {
"details": "Allows a KYC verifier to revert previous KYC authorization to accounts.",
"params": {
"accounts": "The addresses that have been KYC reverted."
}
}
},
"title": "KYC"
},
"userdoc": {
"methods": {}
}
}