UNPKG

tokenboost-veriff-kyc

Version:

Veriff KYC contracts and express backend for TokenBoost

1,069 lines 138 kB
{ "contractName": "VeriffKyc", "abi": [ { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" } ], "name": "OwnershipRenounced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "constant": false, "inputs": [ { "name": "_address", "type": "address" }, { "name": "_status", "type": "uint8" } ], "name": "updateStatusOf", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_address", "type": "address" } ], "name": "statusOf", "outputs": [ { "name": "", "type": "uint8" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_hash", "type": "bytes32" } ], "name": "registerAddressCountryCodeHash", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [ { "name": "_address", "type": "address" }, { "name": "_countryCode", "type": "string" } ], "name": "encoded", "outputs": [ { "name": "", "type": "bytes" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "_address", "type": "address" }, { "name": "_countryCode", "type": "string" } ], "name": "hash", "outputs": [ { "name": "", "type": "bytes32" } ], "payable": false, "stateMutability": "pure", "type": "function" }, { "constant": true, "inputs": [ { "name": "_address", "type": "address" }, { "name": "_countryCode", "type": "string" } ], "name": "countryVerified", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405260008054600160a060020a0319163317905561080c806100256000396000f3006080604052600436106100985763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663600019b1811461009d5780636011a7a114610179578063715018a614610193578063753c411f146101a85780638da5cb5b146101cf57806397a5d5b51461020057806398e4dec514610245578063a3ace177146102c0578063f2fde38b14610339575b600080fd5b3480156100a957600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610104958335600160a060020a031695369560449491939091019190819084018382808284375094975061035a9650505050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013e578181015183820152602001610126565b50505050905090810190601f16801561016b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018557600080fd5b506101916004356103f4565b005b34801561019f57600080fd5b50610191610426565b3480156101b457600080fd5b50610191600160a060020a036004351660ff60243516610492565b3480156101db57600080fd5b506101e4610518565b60408051600160a060020a039092168252519081900360200190f35b34801561020c57600080fd5b50610221600160a060020a0360043516610527565b6040518082600581111561023157fe5b60ff16815260200191505060405180910390f35b34801561025157600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102ac958335600160a060020a03169536956044949193909101919081908401838280828437509497506105459650505050505050565b604080519115158252519081900360200190f35b3480156102cc57600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610327958335600160a060020a031695369560449491939091019190819084018382808284375094975061064c9650505050505050565b60408051918252519081900360200190f35b34801561034557600080fd5b50610191600160a060020a0360043516610740565b606082826040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106103b75780518252601f199092019160209182019101610398565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905092915050565b600054600160a060020a0316331461040b57600080fd5b6000908152600260205260409020805460ff19166001179055565b600054600160a060020a0316331461043d57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146104a957600080fd5b6001600160a060020a03831660009081526001602052604090205460ff1660058111156104d257fe5b14156104dd57600080fd5b600160a060020a03821660009081526001602081905260409091208054839260ff199091169083600581111561050f57fe5b02179055505050565b600054600160a060020a031681565b600160a060020a031660009081526001602052604090205460ff1690565b60008083836040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106105a35780518252601f199092019160209182019101610584565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106106075780518252601f1990920191602091820191016105e8565b51815160209384036101000a6000190180199092169116179052604080519290940182900390912060009081526002909152919091205460ff16979650505050505050565b600082826040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106106a95780518252601f19909201916020918201910161068a565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b6020831061070d5780518252601f1990920191602091820191016106ee565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209695505050505050565b600054600160a060020a0316331461075757600080fd5b61076081610763565b50565b600160a060020a038116151561077857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820da4ab94be58769db35a5b7e324e0069965505beaba980a906abb67a8a32f2cbc0029", "deployedBytecode": "0x6080604052600436106100985763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663600019b1811461009d5780636011a7a114610179578063715018a614610193578063753c411f146101a85780638da5cb5b146101cf57806397a5d5b51461020057806398e4dec514610245578063a3ace177146102c0578063f2fde38b14610339575b600080fd5b3480156100a957600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610104958335600160a060020a031695369560449491939091019190819084018382808284375094975061035a9650505050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013e578181015183820152602001610126565b50505050905090810190601f16801561016b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018557600080fd5b506101916004356103f4565b005b34801561019f57600080fd5b50610191610426565b3480156101b457600080fd5b50610191600160a060020a036004351660ff60243516610492565b3480156101db57600080fd5b506101e4610518565b60408051600160a060020a039092168252519081900360200190f35b34801561020c57600080fd5b50610221600160a060020a0360043516610527565b6040518082600581111561023157fe5b60ff16815260200191505060405180910390f35b34801561025157600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102ac958335600160a060020a03169536956044949193909101919081908401838280828437509497506105459650505050505050565b604080519115158252519081900360200190f35b3480156102cc57600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610327958335600160a060020a031695369560449491939091019190819084018382808284375094975061064c9650505050505050565b60408051918252519081900360200190f35b34801561034557600080fd5b50610191600160a060020a0360043516610740565b606082826040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106103b75780518252601f199092019160209182019101610398565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905092915050565b600054600160a060020a0316331461040b57600080fd5b6000908152600260205260409020805460ff19166001179055565b600054600160a060020a0316331461043d57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146104a957600080fd5b6001600160a060020a03831660009081526001602052604090205460ff1660058111156104d257fe5b14156104dd57600080fd5b600160a060020a03821660009081526001602081905260409091208054839260ff199091169083600581111561050f57fe5b02179055505050565b600054600160a060020a031681565b600160a060020a031660009081526001602052604090205460ff1690565b60008083836040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106105a35780518252601f199092019160209182019101610584565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b602083106106075780518252601f1990920191602091820191016105e8565b51815160209384036101000a6000190180199092169116179052604080519290940182900390912060009081526002909152919091205460ff16979650505050505050565b600082826040516020018083600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140182805190602001908083835b602083106106a95780518252601f19909201916020918201910161068a565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040526040518082805190602001908083835b6020831061070d5780518252601f1990920191602091820191016106ee565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091209695505050505050565b600054600160a060020a0316331461075757600080fd5b61076081610763565b50565b600160a060020a038116151561077857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820da4ab94be58769db35a5b7e324e0069965505beaba980a906abb67a8a32f2cbc0029", "sourceMap": "87:1219:0:-;;;567:5:1;:18;;-1:-1:-1;;;;;;567:18:1;575:10;567:18;;;87:1219:0;;;;;;", "deployedSourceMap": "87:1219:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;765:148;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;765:148:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;765:148:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;765:148:0;;-1:-1:-1;765:148:0;;-1:-1:-1;;;;;;;765:148:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;765:148:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;632:127;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;632:127:0;;;;;;;1001:111:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:1;;;;315:191:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;315:191:0;-1:-1:-1;;;;;315:191:0;;;;;;;;;238:20:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:1;;;;;;;;-1:-1:-1;;;;;238:20:1;;;;;;;;;;;;;;512:114:0;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;512:114:0;-1:-1:-1;;;;;512:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:221;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1083:221:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1083:221:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1083:221:0;;-1:-1:-1;1083:221:0;;-1:-1:-1;;;;;;;1083:221:0;;;;;;;;;;;;;;;;;;;919:158;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;919:158:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;919:158:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;919:158:0;;-1:-1:-1;919:158:0;;-1:-1:-1;;;;;;;919:158:0;;;;;;;;;;;;;;;;;1274:103:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:1;-1:-1:-1;;;;;1274:103:1;;;;;765:148:0;842:5;883:8;893:12;866:40;;;;;;-1:-1:-1;;;;;866:40:0;-1:-1:-1;;;;;866:40:0;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;866:40:0;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;866:40:0;;;859:47;;765:148;;;;:::o;632:127::-;719:5:1;;-1:-1:-1;;;;;719:5:1;705:10;:19;697:28;;;;;;714:31:0;;;;:24;:31;;;;;:38;;-1:-1:-1;;714:38:0;748:4;714:38;;;632:127::o;1001:111:1:-;719:5;;-1:-1:-1;;;;;719:5:1;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:1;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:1;;;1001:111::o;315:191:0:-;719:5:1;;-1:-1:-1;;;;;719:5:1;705:10;:19;697:28;;;;;;437:15:0;-1:-1:-1;;;;;408:25:0;;;;;;:15;:25;;;;;;;;:44;;;;;;;;;;400:53;;;;;;-1:-1:-1;;;;;464:25:0;;;;;;:15;:25;;;;;;;;:35;;492:7;;-1:-1:-1;;464:35:0;;;;492:7;464:35;;;;;;;;;;;;;315:191;;:::o;238:20:1:-;;;-1:-1:-1;;;;;238:20:1;;:::o;512:114:0:-;-1:-1:-1;;;;;594:25:0;569:6;594:25;;;:15;:25;;;;;;;;;512:114::o;1083:221::-;1168:4;1184:12;1226:8;1236:12;1209:40;;;;;;-1:-1:-1;;;;;1209:40:0;-1:-1:-1;;;;;1209:40:0;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1209:40:0;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1209:40:0;;;1199:51;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;1199:51:0;;;;;;;;;;;;;-1:-1:-1;1267:30:0;;;:24;:30;;;;;;;;;;;1083:221;-1:-1:-1;;;;;;;1083:221:0:o;919:158::-;993:7;1046:8;1056:12;1029:40;;;;;;-1:-1:-1;;;;;1029:40:0;-1:-1:-1;;;;;1029:40:0;;;;;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;1029:40:0;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;1029:40:0;;;1019:51;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;;;;365:33;;1019:51:0;;;;;;;;;;;;-1:-1:-1;;;;;;919:158:0:o;1274:103:1:-;719:5;;-1:-1:-1;;;;;719:5:1;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;1512:171::-;-1:-1:-1;;;;;1582:23:1;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:1;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:1;-1:-1:-1;;;;;1661:17:1;;;;;;;;;;1512:171::o", "source": "pragma solidity ^0.4.24;\n\nimport \"zeppelin-solidity/contracts/ownership/Ownable.sol\";\n\ncontract VeriffKyc is Ownable {\n\n enum Status {None, Approved, ResubmissionRequested, Declined, Expired, Abandoned}\n\n mapping(address => Status) statusOfAddress;\n mapping(bytes32 => bool) addressCountryCodeHashes;\n\n function updateStatusOf(address _address, Status _status) public onlyOwner {\n require(statusOfAddress[_address] != Status.Approved);\n\n statusOfAddress[_address] = _status;\n }\n\n function statusOf(address _address) public view returns (Status) {\n return statusOfAddress[_address];\n }\n\n function registerAddressCountryCodeHash(bytes32 _hash) public onlyOwner {\n addressCountryCodeHashes[_hash] = true;\n }\n\n function encoded(address _address, string _countryCode) public pure returns (bytes) {\n return abi.encodePacked(_address, _countryCode);\n }\n\n function hash(address _address, string _countryCode) public pure returns (bytes32) {\n return keccak256(abi.encodePacked(_address, _countryCode));\n }\n\n function countryVerified(address _address, string _countryCode) public view returns (bool) {\n bytes32 hash = keccak256(abi.encodePacked(_address, _countryCode));\n return addressCountryCodeHashes[hash];\n }\n}\n", "sourcePath": "/Users/yoonjae/SolidityProjects/tokenboost-veriff-kyc/contracts/VeriffKyc.sol", "ast": { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-veriff-kyc/contracts/VeriffKyc.sol", "exportedSymbols": { "VeriffKyc": [ 129 ] }, "id": 130, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:0" }, { "absolutePath": "zeppelin-solidity/contracts/ownership/Ownable.sol", "file": "zeppelin-solidity/contracts/ownership/Ownable.sol", "id": 2, "nodeType": "ImportDirective", "scope": 130, "sourceUnit": 216, "src": "26:59:0", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 3, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 215, "src": "109:7:0", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$215", "typeString": "contract Ownable" } }, "id": 4, "nodeType": "InheritanceSpecifier", "src": "109:7:0" } ], "contractDependencies": [ 215 ], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 129, "linearizedBaseContracts": [ 129, 215 ], "name": "VeriffKyc", "nodeType": "ContractDefinition", "nodes": [ { "canonicalName": "VeriffKyc.Status", "id": 11, "members": [ { "id": 5, "name": "None", "nodeType": "EnumValue", "src": "137:4:0" }, { "id": 6, "name": "Approved", "nodeType": "EnumValue", "src": "143:8:0" }, { "id": 7, "name": "ResubmissionRequested", "nodeType": "EnumValue", "src": "153:21:0" }, { "id": 8, "name": "Declined", "nodeType": "EnumValue", "src": "176:8:0" }, { "id": 9, "name": "Expired", "nodeType": "EnumValue", "src": "186:7:0" }, { "id": 10, "name": "Abandoned", "nodeType": "EnumValue", "src": "195:9:0" } ], "name": "Status", "nodeType": "EnumDefinition", "src": "124:81:0" }, { "constant": false, "id": 15, "name": "statusOfAddress", "nodeType": "VariableDeclaration", "scope": 129, "src": "211:42:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_enum$_Status_$11_$", "typeString": "mapping(address => enum VeriffKyc.Status)" }, "typeName": { "id": 14, "keyType": { "id": 12, "name": "address", "nodeType": "ElementaryTypeName", "src": "219:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "211:26:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_enum$_Status_$11_$", "typeString": "mapping(address => enum VeriffKyc.Status)" }, "valueType": { "contractScope": null, "id": 13, "name": "Status", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11, "src": "230:6:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 19, "name": "addressCountryCodeHashes", "nodeType": "VariableDeclaration", "scope": 129, "src": "259:49:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "typeName": { "id": 18, "keyType": { "id": 16, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "267:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "nodeType": "Mapping", "src": "259:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" }, "valueType": { "id": 17, "name": "bool", "nodeType": "ElementaryTypeName", "src": "278:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } }, "value": null, "visibility": "internal" }, { "body": { "id": 43, "nodeType": "Block", "src": "390:116:0", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" }, "id": 34, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 29, "name": "statusOfAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "408:15:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_enum$_Status_$11_$", "typeString": "mapping(address => enum VeriffKyc.Status)" } }, "id": 31, "indexExpression": { "argumentTypes": null, "id": 30, "name": "_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21, "src": "424:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "408:25:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 32, "name": "Status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 11, "src": "437:6:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_enum$_Status_$11_$", "typeString": "type(enum VeriffKyc.Status)" } }, "id": 33, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "memberName": "Approved", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "437:15:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "src": "408:44:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 28, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 233, 234 ], "referencedDeclaration": 233, "src": "400:7:0", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 35, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "400:53:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 36, "nodeType": "ExpressionStatement", "src": "400:53:0" }, { "expression": { "argumentTypes": null, "id": 41, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 37, "name": "statusOfAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "464:15:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_enum$_Status_$11_$", "typeString": "mapping(address => enum VeriffKyc.Status)" } }, "id": 39, "indexExpression": { "argumentTypes": null, "id": 38, "name": "_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 21, "src": "480:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "464:25:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 40, "name": "_status", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 23, "src": "492:7:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "src": "464:35:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "id": 42, "nodeType": "ExpressionStatement", "src": "464:35:0" } ] }, "documentation": null, "id": 44, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 26, "modifierName": { "argumentTypes": null, "id": 25, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 163, "src": "380:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "380:9:0" } ], "name": "updateStatusOf", "nodeType": "FunctionDefinition", "parameters": { "id": 24, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 21, "name": "_address", "nodeType": "VariableDeclaration", "scope": 44, "src": "339:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 20, "name": "address", "nodeType": "ElementaryTypeName", "src": "339:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 23, "name": "_status", "nodeType": "VariableDeclaration", "scope": 44, "src": "357:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" }, "typeName": { "contractScope": null, "id": 22, "name": "Status", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11, "src": "357:6:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "value": null, "visibility": "internal" } ], "src": "338:34:0" }, "payable": false, "returnParameters": { "id": 27, "nodeType": "ParameterList", "parameters": [], "src": "390:0:0" }, "scope": 129, "src": "315:191:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 55, "nodeType": "Block", "src": "577:49:0", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 51, "name": "statusOfAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 15, "src": "594:15:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_enum$_Status_$11_$", "typeString": "mapping(address => enum VeriffKyc.Status)" } }, "id": 53, "indexExpression": { "argumentTypes": null, "id": 52, "name": "_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 46, "src": "610:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "594:25:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "functionReturnParameters": 50, "id": 54, "nodeType": "Return", "src": "587:32:0" } ] }, "documentation": null, "id": 56, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "statusOf", "nodeType": "FunctionDefinition", "parameters": { "id": 47, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 46, "name": "_address", "nodeType": "VariableDeclaration", "scope": 56, "src": "530:16:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 45, "name": "address", "nodeType": "ElementaryTypeName", "src": "530:7:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "529:18:0" }, "payable": false, "returnParameters": { "id": 50, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 49, "name": "", "nodeType": "VariableDeclaration", "scope": 56, "src": "569:6:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" }, "typeName": { "contractScope": null, "id": 48, "name": "Status", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 11, "src": "569:6:0", "typeDescriptions": { "typeIdentifier": "t_enum$_Status_$11", "typeString": "enum VeriffKyc.Status" } }, "value": null, "visibility": "internal" } ], "src": "568:8:0" }, "scope": 129, "src": "512:114:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 69, "nodeType": "Block", "src": "704:55:0", "statements": [ { "expression": { "argumentTypes": null, "id": 67, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 63, "name": "addressCountryCodeHashes", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 19, "src": "714:24:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", "typeString": "mapping(bytes32 => bool)" } }, "id": 65, "indexExpression": { "argumentTypes": null, "id": 64, "name": "_hash", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 58, "src": "739:5:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "714:31:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 66, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "748:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "714:38:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 68, "nodeType": "ExpressionStatement", "src": "714:38:0" } ] }, "documentation": null, "id": 70, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 61, "modifierName": { "argumentTypes": null, "id": 60, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 163, "src": "694:9:0", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "694:9:0" } ], "name": "registerAddressCountryCodeHash", "nodeType": "FunctionDefinition", "parameters": { "id": 59, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 58, "name": "_hash", "nodeType": "VariableDeclaration", "scope": 70, "src": "672:13:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 57, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "672:7:0", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" } ], "src": "671:15:0" }, "payable": false, "returnParameters": { "id": 62, "nodeType": "ParameterList", "parameters": [], "src": "704:0:0" }, "scope": 129, "src": "632:127:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 85, "nodeType": "Block", "src": "849:64:0", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 81, "name": "_address", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 72, "src": "883:8:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "id": 82, "name": "_countryCode", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 74, "src": "893:12:0", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } ], "expression": { "argumentTypes": null, "id": 79, "name": "abi", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 217, "src": "866:3:0", "typeDesc