secure-transac-contracts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/AccessControl.json +4579 -0
- package/build/contracts/Context.json +356 -0
- package/build/contracts/CreditSystem.json +6037 -0
- package/build/contracts/ECDSA.json +4734 -0
- package/build/contracts/EIP712.json +3021 -0
- package/build/contracts/ERC165.json +352 -0
- package/build/contracts/ERC20.json +6816 -0
- package/build/contracts/ERC20Permit.json +2658 -0
- package/build/contracts/ERC721.json +12779 -0
- package/build/contracts/ERC721Utils.json +1058 -0
- package/build/contracts/Groth16Verifier.json +6298 -0
- package/build/contracts/Guardian.json +1116 -0
- package/build/contracts/IERC1155Errors.json +1687 -0
- package/build/contracts/IERC165.json +197 -0
- package/build/contracts/IERC20.json +1162 -0
- package/build/contracts/IERC20Errors.json +1662 -0
- package/build/contracts/IERC20Metadata.json +574 -0
- package/build/contracts/IERC20Permit.json +546 -0
- package/build/contracts/IERC5267.json +392 -0
- package/build/contracts/IERC721.json +1729 -0
- package/build/contracts/IERC721Errors.json +1694 -0
- package/build/contracts/IERC721Metadata.json +728 -0
- package/build/contracts/IERC721Receiver.json +296 -0
- package/build/contracts/IGuardian.json +215 -0
- package/build/contracts/ITrustRegistry.json +6767 -0
- package/build/contracts/IdentityVault.json +11584 -0
- package/build/contracts/Math.json +23115 -0
- package/build/contracts/MessageHashUtils.json +1668 -0
- package/build/contracts/Nonces.json +865 -0
- package/build/contracts/Ownable.json +1859 -0
- package/build/contracts/Panic.json +798 -0
- package/build/contracts/ReportingSystem.json +2787 -0
- package/build/contracts/SafeCast.json +21592 -0
- package/build/contracts/ScoringSystem.json +11245 -0
- package/build/contracts/SecureTransacSBT.json +18823 -0
- package/build/contracts/SecureTransacToken.json +19225 -0
- package/build/contracts/SecureVault.json +12890 -0
- package/build/contracts/ShortStrings.json +2852 -0
- package/build/contracts/SignedMath.json +1915 -0
- package/build/contracts/StorageSlot.json +1773 -0
- package/build/contracts/Strings.json +19001 -0
- package/build/contracts/TransactionLogger.json +5325 -0
- package/build/contracts/TrustDAO.json +23850 -0
- package/build/contracts/TrustRegistry.json +10948 -0
- package/build/contracts/VerificationRegistry.json +12811 -0
- package/build/contracts/ZKIdentityVerifier.json +13979 -0
- package/contracts/AccessControl.sol +34 -0
- package/contracts/CreditSystem.sol +48 -0
- package/contracts/Guardian.sol +33 -0
- package/contracts/IGuardian.sol +7 -0
- package/contracts/IdentityVault.sol +57 -0
- package/contracts/ReportingSystem.sol +14 -0
- package/contracts/ScoringSystem.sol +71 -0
- package/contracts/SecureTransacSBT.sol +72 -0
- package/contracts/SecureTransacToken.sol +20 -0
- package/contracts/SecureVault.sol +24 -0
- package/contracts/TransactionLogger.sol +12 -0
- package/contracts/TrustDAO.sol +158 -0
- package/contracts/TrustRegistry.sol +23 -0
- package/contracts/VerificationRegistry.sol +51 -0
- package/contracts/ZKIdentityVerifier.sol +38 -0
- package/contracts/ZKScoreVerifier.sol +175 -0
- package/package.json +32 -0
|
@@ -0,0 +1,1116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "Guardian",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "address",
|
|
8
|
+
"name": "user",
|
|
9
|
+
"type": "address"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"name": "AddressBlacklisted",
|
|
13
|
+
"type": "error"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [
|
|
17
|
+
{
|
|
18
|
+
"internalType": "address",
|
|
19
|
+
"name": "user",
|
|
20
|
+
"type": "address"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "uint256",
|
|
24
|
+
"name": "score",
|
|
25
|
+
"type": "uint256"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"internalType": "uint256",
|
|
29
|
+
"name": "required",
|
|
30
|
+
"type": "uint256"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"name": "InsufficientTrustScore",
|
|
34
|
+
"type": "error"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"inputs": [],
|
|
38
|
+
"name": "minRequiredScore",
|
|
39
|
+
"outputs": [
|
|
40
|
+
{
|
|
41
|
+
"internalType": "uint256",
|
|
42
|
+
"name": "",
|
|
43
|
+
"type": "uint256"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"stateMutability": "view",
|
|
47
|
+
"type": "function"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"inputs": [],
|
|
51
|
+
"name": "registry",
|
|
52
|
+
"outputs": [
|
|
53
|
+
{
|
|
54
|
+
"internalType": "contract TrustRegistry",
|
|
55
|
+
"name": "",
|
|
56
|
+
"type": "address"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"stateMutability": "view",
|
|
60
|
+
"type": "function"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"AddressBlacklisted\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"score\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"required\",\"type\":\"uint256\"}],\"name\":\"InsufficientTrustScore\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"minRequiredScore\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract TrustRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base contract to provide trust-score based access control.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Guardian\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Guardian.sol\":\"Guardian\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8ed324d3920bb545059d66ab97d43e43ee85fd3bd52e03e401f020afb0b120f6\",\"dweb:/ipfs/QmfEckWLmZkDDcoWrkEvMWhms66xwTLff9DDhegYpvHo1a\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6a708e8a5bdb1011c2c381c9a5cfd8a9a956d7d0a9dc1bd8bcdaf52f76ef2f12\",\"dweb:/ipfs/Qmax9WHBnVsZP46ZxEMNRQpLQnrdE4dK8LehML1Py8FowF\"]},\"project:/contracts/AccessControl.sol\":{\"keccak256\":\"0x30c4cd3a2919866093cdd3182a6fa72d88d532294b87ef13246081e628ead55c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ff53ff54fd0fce183eb8d221030095d0cf538a68c066d359f6d5210a2246faf\",\"dweb:/ipfs/QmQiAf4q99aUH9irCgDUFqhWJqFW48K1kPd5cpmq3oDH2t\"]},\"project:/contracts/CreditSystem.sol\":{\"keccak256\":\"0xee1b0409159a738e1dc700e377759a0a3ec3cae0040ae110561589c5c681c47a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bfb826c5c17cef0a823b2ab99f8c15a8bc0aaa742715da8c362c8d6db87df044\",\"dweb:/ipfs/QmWC3CZtruke6i8cHcrPPWMEXurTj6L5WNDM75dZLmUYP2\"]},\"project:/contracts/Guardian.sol\":{\"keccak256\":\"0xfbfb9774cc30e7d94e752e82b09b92ed58c1c133d86ef663203f8d3086324d12\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3d515e880ce0b622b5d2fd87b86a75cf0ab15d6fe116068ecae39d767d683df8\",\"dweb:/ipfs/Qmdj8N7r3aiBbYmypw99jtZXBheN8BT68grMRC8hrmCrPN\"]},\"project:/contracts/ReportingSystem.sol\":{\"keccak256\":\"0x6f0b502db35b43562949da23ff76a0a2dcc77319e2a595bb05b43b5afd6af98a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://796b857ade2adcdad3761a2a7f09a4b7f25cd3d2d9a1c8ec46ec773b12f5bfe3\",\"dweb:/ipfs/QmRA6MB3dgG72iFPmcgFkTDwjBwhVrSL3c3ygyefsMdu2j\"]},\"project:/contracts/ScoringSystem.sol\":{\"keccak256\":\"0x370321b41399fe5d2aa1b81e5a7155c5f995ff7c98c6615bdb21996962a40f81\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://229b6dc252fdb8b09f9d6331cd704e80c5c324bee3d46e37c9b364a94998d048\",\"dweb:/ipfs/QmfZ7PxXxMCuKwNcKHJnEbBdpsREQmg8KLhVnKfnsPe8jg\"]},\"project:/contracts/TransactionLogger.sol\":{\"keccak256\":\"0xc1271adaf52293d3094ffaa72c00dcb439d74e4829a3162c82f613eafa638469\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://45376adba3aaca32c9929851d326c1c7faf205e7ce4c85c79d3bc61b0607f6ba\",\"dweb:/ipfs/Qmc6s5jCU6jvaQBtcTsAwt7Z9dnDerYj4nJMw679FA27Uu\"]},\"project:/contracts/TrustRegistry.sol\":{\"keccak256\":\"0x99dd7b5fff1701974e1d701855bf32ecd745376007d643358716f4ee6b895c9b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://942b87d57cf9f2297e4128c45e2f79142b5da870533991926365513db1f5ab70\",\"dweb:/ipfs/Qmafy1NHPKuHk38uDtp373EkSu1FdFzgYBfuNKGMCNntw9\"]}},\"version\":1}",
|
|
64
|
+
"bytecode": "0x",
|
|
65
|
+
"deployedBytecode": "0x",
|
|
66
|
+
"immutableReferences": {},
|
|
67
|
+
"generatedSources": [],
|
|
68
|
+
"deployedGeneratedSources": [],
|
|
69
|
+
"sourceMap": "",
|
|
70
|
+
"deployedSourceMap": "",
|
|
71
|
+
"source": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.0;\r\n\r\nimport \"./TrustRegistry.sol\";\r\n\r\n/**\r\n * @title Guardian\r\n * @dev Base contract to provide trust-score based access control.\r\n */\r\nabstract contract Guardian {\r\n TrustRegistry public immutable registry;\r\n uint256 public minRequiredScore;\r\n\r\n error InsufficientTrustScore(address user, uint256 score, uint256 required);\r\n error AddressBlacklisted(address user);\r\n\r\n constructor(address _registry, uint256 _minScore) {\r\n registry = TrustRegistry(_registry);\r\n minRequiredScore = _minScore;\r\n }\r\n\r\n modifier onlyTrusted() {\r\n uint256 userScore = registry.getScore(msg.sender);\r\n \r\n require(!registry.isBlacklisted(msg.sender), \"Address blacklisted\");\r\n require(userScore >= minRequiredScore, \"Insufficient trust score\");\r\n _;\r\n }\r\n\r\n function updateMinScore(uint256 _newMinScore) internal {\r\n minRequiredScore = _newMinScore;\r\n }\r\n}\r\n",
|
|
72
|
+
"sourcePath": "J:\\Users\\ayush\\Desktop\\code\\Pecathon\\onchain\\contracts\\Guardian.sol",
|
|
73
|
+
"ast": {
|
|
74
|
+
"absolutePath": "project:/contracts/Guardian.sol",
|
|
75
|
+
"exportedSymbols": {
|
|
76
|
+
"AccessControl": [
|
|
77
|
+
8534
|
|
78
|
+
],
|
|
79
|
+
"Context": [
|
|
80
|
+
2345
|
|
81
|
+
],
|
|
82
|
+
"CreditSystem": [
|
|
83
|
+
8651
|
|
84
|
+
],
|
|
85
|
+
"Guardian": [
|
|
86
|
+
8730
|
|
87
|
+
],
|
|
88
|
+
"Ownable": [
|
|
89
|
+
147
|
|
90
|
+
],
|
|
91
|
+
"ReportingSystem": [
|
|
92
|
+
8922
|
|
93
|
+
],
|
|
94
|
+
"ScoringSystem": [
|
|
95
|
+
9150
|
|
96
|
+
],
|
|
97
|
+
"TransactionLogger": [
|
|
98
|
+
9510
|
|
99
|
+
],
|
|
100
|
+
"TrustRegistry": [
|
|
101
|
+
10051
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"id": 8731,
|
|
105
|
+
"license": "MIT",
|
|
106
|
+
"nodeType": "SourceUnit",
|
|
107
|
+
"nodes": [
|
|
108
|
+
{
|
|
109
|
+
"id": 8653,
|
|
110
|
+
"literals": [
|
|
111
|
+
"solidity",
|
|
112
|
+
"^",
|
|
113
|
+
"0.8",
|
|
114
|
+
".0"
|
|
115
|
+
],
|
|
116
|
+
"nodeType": "PragmaDirective",
|
|
117
|
+
"src": "33:23:29"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"absolutePath": "project:/contracts/TrustRegistry.sol",
|
|
121
|
+
"file": "./TrustRegistry.sol",
|
|
122
|
+
"id": 8654,
|
|
123
|
+
"nameLocation": "-1:-1:-1",
|
|
124
|
+
"nodeType": "ImportDirective",
|
|
125
|
+
"scope": 8731,
|
|
126
|
+
"sourceUnit": 10052,
|
|
127
|
+
"src": "60:29:29",
|
|
128
|
+
"symbolAliases": [],
|
|
129
|
+
"unitAlias": ""
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"abstract": true,
|
|
133
|
+
"baseContracts": [],
|
|
134
|
+
"canonicalName": "Guardian",
|
|
135
|
+
"contractDependencies": [],
|
|
136
|
+
"contractKind": "contract",
|
|
137
|
+
"documentation": {
|
|
138
|
+
"id": 8655,
|
|
139
|
+
"nodeType": "StructuredDocumentation",
|
|
140
|
+
"src": "93:96:29",
|
|
141
|
+
"text": " @title Guardian\n @dev Base contract to provide trust-score based access control."
|
|
142
|
+
},
|
|
143
|
+
"fullyImplemented": true,
|
|
144
|
+
"id": 8730,
|
|
145
|
+
"linearizedBaseContracts": [
|
|
146
|
+
8730
|
|
147
|
+
],
|
|
148
|
+
"name": "Guardian",
|
|
149
|
+
"nameLocation": "209:8:29",
|
|
150
|
+
"nodeType": "ContractDefinition",
|
|
151
|
+
"nodes": [
|
|
152
|
+
{
|
|
153
|
+
"constant": false,
|
|
154
|
+
"functionSelector": "7b103999",
|
|
155
|
+
"id": 8658,
|
|
156
|
+
"mutability": "immutable",
|
|
157
|
+
"name": "registry",
|
|
158
|
+
"nameLocation": "256:8:29",
|
|
159
|
+
"nodeType": "VariableDeclaration",
|
|
160
|
+
"scope": 8730,
|
|
161
|
+
"src": "225:39:29",
|
|
162
|
+
"stateVariable": true,
|
|
163
|
+
"storageLocation": "default",
|
|
164
|
+
"typeDescriptions": {
|
|
165
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
166
|
+
"typeString": "contract TrustRegistry"
|
|
167
|
+
},
|
|
168
|
+
"typeName": {
|
|
169
|
+
"id": 8657,
|
|
170
|
+
"nodeType": "UserDefinedTypeName",
|
|
171
|
+
"pathNode": {
|
|
172
|
+
"id": 8656,
|
|
173
|
+
"name": "TrustRegistry",
|
|
174
|
+
"nameLocations": [
|
|
175
|
+
"225:13:29"
|
|
176
|
+
],
|
|
177
|
+
"nodeType": "IdentifierPath",
|
|
178
|
+
"referencedDeclaration": 10051,
|
|
179
|
+
"src": "225:13:29"
|
|
180
|
+
},
|
|
181
|
+
"referencedDeclaration": 10051,
|
|
182
|
+
"src": "225:13:29",
|
|
183
|
+
"typeDescriptions": {
|
|
184
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
185
|
+
"typeString": "contract TrustRegistry"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"visibility": "public"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"constant": false,
|
|
192
|
+
"functionSelector": "aa3b088c",
|
|
193
|
+
"id": 8660,
|
|
194
|
+
"mutability": "mutable",
|
|
195
|
+
"name": "minRequiredScore",
|
|
196
|
+
"nameLocation": "286:16:29",
|
|
197
|
+
"nodeType": "VariableDeclaration",
|
|
198
|
+
"scope": 8730,
|
|
199
|
+
"src": "271:31:29",
|
|
200
|
+
"stateVariable": true,
|
|
201
|
+
"storageLocation": "default",
|
|
202
|
+
"typeDescriptions": {
|
|
203
|
+
"typeIdentifier": "t_uint256",
|
|
204
|
+
"typeString": "uint256"
|
|
205
|
+
},
|
|
206
|
+
"typeName": {
|
|
207
|
+
"id": 8659,
|
|
208
|
+
"name": "uint256",
|
|
209
|
+
"nodeType": "ElementaryTypeName",
|
|
210
|
+
"src": "271:7:29",
|
|
211
|
+
"typeDescriptions": {
|
|
212
|
+
"typeIdentifier": "t_uint256",
|
|
213
|
+
"typeString": "uint256"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"visibility": "public"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"errorSelector": "acc7954e",
|
|
220
|
+
"id": 8668,
|
|
221
|
+
"name": "InsufficientTrustScore",
|
|
222
|
+
"nameLocation": "317:22:29",
|
|
223
|
+
"nodeType": "ErrorDefinition",
|
|
224
|
+
"parameters": {
|
|
225
|
+
"id": 8667,
|
|
226
|
+
"nodeType": "ParameterList",
|
|
227
|
+
"parameters": [
|
|
228
|
+
{
|
|
229
|
+
"constant": false,
|
|
230
|
+
"id": 8662,
|
|
231
|
+
"mutability": "mutable",
|
|
232
|
+
"name": "user",
|
|
233
|
+
"nameLocation": "348:4:29",
|
|
234
|
+
"nodeType": "VariableDeclaration",
|
|
235
|
+
"scope": 8668,
|
|
236
|
+
"src": "340:12:29",
|
|
237
|
+
"stateVariable": false,
|
|
238
|
+
"storageLocation": "default",
|
|
239
|
+
"typeDescriptions": {
|
|
240
|
+
"typeIdentifier": "t_address",
|
|
241
|
+
"typeString": "address"
|
|
242
|
+
},
|
|
243
|
+
"typeName": {
|
|
244
|
+
"id": 8661,
|
|
245
|
+
"name": "address",
|
|
246
|
+
"nodeType": "ElementaryTypeName",
|
|
247
|
+
"src": "340:7:29",
|
|
248
|
+
"stateMutability": "nonpayable",
|
|
249
|
+
"typeDescriptions": {
|
|
250
|
+
"typeIdentifier": "t_address",
|
|
251
|
+
"typeString": "address"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"visibility": "internal"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"constant": false,
|
|
258
|
+
"id": 8664,
|
|
259
|
+
"mutability": "mutable",
|
|
260
|
+
"name": "score",
|
|
261
|
+
"nameLocation": "362:5:29",
|
|
262
|
+
"nodeType": "VariableDeclaration",
|
|
263
|
+
"scope": 8668,
|
|
264
|
+
"src": "354:13:29",
|
|
265
|
+
"stateVariable": false,
|
|
266
|
+
"storageLocation": "default",
|
|
267
|
+
"typeDescriptions": {
|
|
268
|
+
"typeIdentifier": "t_uint256",
|
|
269
|
+
"typeString": "uint256"
|
|
270
|
+
},
|
|
271
|
+
"typeName": {
|
|
272
|
+
"id": 8663,
|
|
273
|
+
"name": "uint256",
|
|
274
|
+
"nodeType": "ElementaryTypeName",
|
|
275
|
+
"src": "354:7:29",
|
|
276
|
+
"typeDescriptions": {
|
|
277
|
+
"typeIdentifier": "t_uint256",
|
|
278
|
+
"typeString": "uint256"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"visibility": "internal"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"constant": false,
|
|
285
|
+
"id": 8666,
|
|
286
|
+
"mutability": "mutable",
|
|
287
|
+
"name": "required",
|
|
288
|
+
"nameLocation": "377:8:29",
|
|
289
|
+
"nodeType": "VariableDeclaration",
|
|
290
|
+
"scope": 8668,
|
|
291
|
+
"src": "369:16:29",
|
|
292
|
+
"stateVariable": false,
|
|
293
|
+
"storageLocation": "default",
|
|
294
|
+
"typeDescriptions": {
|
|
295
|
+
"typeIdentifier": "t_uint256",
|
|
296
|
+
"typeString": "uint256"
|
|
297
|
+
},
|
|
298
|
+
"typeName": {
|
|
299
|
+
"id": 8665,
|
|
300
|
+
"name": "uint256",
|
|
301
|
+
"nodeType": "ElementaryTypeName",
|
|
302
|
+
"src": "369:7:29",
|
|
303
|
+
"typeDescriptions": {
|
|
304
|
+
"typeIdentifier": "t_uint256",
|
|
305
|
+
"typeString": "uint256"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"visibility": "internal"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"src": "339:47:29"
|
|
312
|
+
},
|
|
313
|
+
"src": "311:76:29"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"errorSelector": "daf49ab9",
|
|
317
|
+
"id": 8672,
|
|
318
|
+
"name": "AddressBlacklisted",
|
|
319
|
+
"nameLocation": "399:18:29",
|
|
320
|
+
"nodeType": "ErrorDefinition",
|
|
321
|
+
"parameters": {
|
|
322
|
+
"id": 8671,
|
|
323
|
+
"nodeType": "ParameterList",
|
|
324
|
+
"parameters": [
|
|
325
|
+
{
|
|
326
|
+
"constant": false,
|
|
327
|
+
"id": 8670,
|
|
328
|
+
"mutability": "mutable",
|
|
329
|
+
"name": "user",
|
|
330
|
+
"nameLocation": "426:4:29",
|
|
331
|
+
"nodeType": "VariableDeclaration",
|
|
332
|
+
"scope": 8672,
|
|
333
|
+
"src": "418:12:29",
|
|
334
|
+
"stateVariable": false,
|
|
335
|
+
"storageLocation": "default",
|
|
336
|
+
"typeDescriptions": {
|
|
337
|
+
"typeIdentifier": "t_address",
|
|
338
|
+
"typeString": "address"
|
|
339
|
+
},
|
|
340
|
+
"typeName": {
|
|
341
|
+
"id": 8669,
|
|
342
|
+
"name": "address",
|
|
343
|
+
"nodeType": "ElementaryTypeName",
|
|
344
|
+
"src": "418:7:29",
|
|
345
|
+
"stateMutability": "nonpayable",
|
|
346
|
+
"typeDescriptions": {
|
|
347
|
+
"typeIdentifier": "t_address",
|
|
348
|
+
"typeString": "address"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"visibility": "internal"
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
"src": "417:14:29"
|
|
355
|
+
},
|
|
356
|
+
"src": "393:39:29"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"body": {
|
|
360
|
+
"id": 8689,
|
|
361
|
+
"nodeType": "Block",
|
|
362
|
+
"src": "490:93:29",
|
|
363
|
+
"statements": [
|
|
364
|
+
{
|
|
365
|
+
"expression": {
|
|
366
|
+
"id": 8683,
|
|
367
|
+
"isConstant": false,
|
|
368
|
+
"isLValue": false,
|
|
369
|
+
"isPure": false,
|
|
370
|
+
"lValueRequested": false,
|
|
371
|
+
"leftHandSide": {
|
|
372
|
+
"id": 8679,
|
|
373
|
+
"name": "registry",
|
|
374
|
+
"nodeType": "Identifier",
|
|
375
|
+
"overloadedDeclarations": [],
|
|
376
|
+
"referencedDeclaration": 8658,
|
|
377
|
+
"src": "501:8:29",
|
|
378
|
+
"typeDescriptions": {
|
|
379
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
380
|
+
"typeString": "contract TrustRegistry"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"nodeType": "Assignment",
|
|
384
|
+
"operator": "=",
|
|
385
|
+
"rightHandSide": {
|
|
386
|
+
"arguments": [
|
|
387
|
+
{
|
|
388
|
+
"id": 8681,
|
|
389
|
+
"name": "_registry",
|
|
390
|
+
"nodeType": "Identifier",
|
|
391
|
+
"overloadedDeclarations": [],
|
|
392
|
+
"referencedDeclaration": 8674,
|
|
393
|
+
"src": "526:9:29",
|
|
394
|
+
"typeDescriptions": {
|
|
395
|
+
"typeIdentifier": "t_address",
|
|
396
|
+
"typeString": "address"
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
"expression": {
|
|
401
|
+
"argumentTypes": [
|
|
402
|
+
{
|
|
403
|
+
"typeIdentifier": "t_address",
|
|
404
|
+
"typeString": "address"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"id": 8680,
|
|
408
|
+
"name": "TrustRegistry",
|
|
409
|
+
"nodeType": "Identifier",
|
|
410
|
+
"overloadedDeclarations": [],
|
|
411
|
+
"referencedDeclaration": 10051,
|
|
412
|
+
"src": "512:13:29",
|
|
413
|
+
"typeDescriptions": {
|
|
414
|
+
"typeIdentifier": "t_type$_t_contract$_TrustRegistry_$10051_$",
|
|
415
|
+
"typeString": "type(contract TrustRegistry)"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"id": 8682,
|
|
419
|
+
"isConstant": false,
|
|
420
|
+
"isLValue": false,
|
|
421
|
+
"isPure": false,
|
|
422
|
+
"kind": "typeConversion",
|
|
423
|
+
"lValueRequested": false,
|
|
424
|
+
"nameLocations": [],
|
|
425
|
+
"names": [],
|
|
426
|
+
"nodeType": "FunctionCall",
|
|
427
|
+
"src": "512:24:29",
|
|
428
|
+
"tryCall": false,
|
|
429
|
+
"typeDescriptions": {
|
|
430
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
431
|
+
"typeString": "contract TrustRegistry"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"src": "501:35:29",
|
|
435
|
+
"typeDescriptions": {
|
|
436
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
437
|
+
"typeString": "contract TrustRegistry"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"id": 8684,
|
|
441
|
+
"nodeType": "ExpressionStatement",
|
|
442
|
+
"src": "501:35:29"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"expression": {
|
|
446
|
+
"id": 8687,
|
|
447
|
+
"isConstant": false,
|
|
448
|
+
"isLValue": false,
|
|
449
|
+
"isPure": false,
|
|
450
|
+
"lValueRequested": false,
|
|
451
|
+
"leftHandSide": {
|
|
452
|
+
"id": 8685,
|
|
453
|
+
"name": "minRequiredScore",
|
|
454
|
+
"nodeType": "Identifier",
|
|
455
|
+
"overloadedDeclarations": [],
|
|
456
|
+
"referencedDeclaration": 8660,
|
|
457
|
+
"src": "547:16:29",
|
|
458
|
+
"typeDescriptions": {
|
|
459
|
+
"typeIdentifier": "t_uint256",
|
|
460
|
+
"typeString": "uint256"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"nodeType": "Assignment",
|
|
464
|
+
"operator": "=",
|
|
465
|
+
"rightHandSide": {
|
|
466
|
+
"id": 8686,
|
|
467
|
+
"name": "_minScore",
|
|
468
|
+
"nodeType": "Identifier",
|
|
469
|
+
"overloadedDeclarations": [],
|
|
470
|
+
"referencedDeclaration": 8676,
|
|
471
|
+
"src": "566:9:29",
|
|
472
|
+
"typeDescriptions": {
|
|
473
|
+
"typeIdentifier": "t_uint256",
|
|
474
|
+
"typeString": "uint256"
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"src": "547:28:29",
|
|
478
|
+
"typeDescriptions": {
|
|
479
|
+
"typeIdentifier": "t_uint256",
|
|
480
|
+
"typeString": "uint256"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"id": 8688,
|
|
484
|
+
"nodeType": "ExpressionStatement",
|
|
485
|
+
"src": "547:28:29"
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
"id": 8690,
|
|
490
|
+
"implemented": true,
|
|
491
|
+
"kind": "constructor",
|
|
492
|
+
"modifiers": [],
|
|
493
|
+
"name": "",
|
|
494
|
+
"nameLocation": "-1:-1:-1",
|
|
495
|
+
"nodeType": "FunctionDefinition",
|
|
496
|
+
"parameters": {
|
|
497
|
+
"id": 8677,
|
|
498
|
+
"nodeType": "ParameterList",
|
|
499
|
+
"parameters": [
|
|
500
|
+
{
|
|
501
|
+
"constant": false,
|
|
502
|
+
"id": 8674,
|
|
503
|
+
"mutability": "mutable",
|
|
504
|
+
"name": "_registry",
|
|
505
|
+
"nameLocation": "460:9:29",
|
|
506
|
+
"nodeType": "VariableDeclaration",
|
|
507
|
+
"scope": 8690,
|
|
508
|
+
"src": "452:17:29",
|
|
509
|
+
"stateVariable": false,
|
|
510
|
+
"storageLocation": "default",
|
|
511
|
+
"typeDescriptions": {
|
|
512
|
+
"typeIdentifier": "t_address",
|
|
513
|
+
"typeString": "address"
|
|
514
|
+
},
|
|
515
|
+
"typeName": {
|
|
516
|
+
"id": 8673,
|
|
517
|
+
"name": "address",
|
|
518
|
+
"nodeType": "ElementaryTypeName",
|
|
519
|
+
"src": "452:7:29",
|
|
520
|
+
"stateMutability": "nonpayable",
|
|
521
|
+
"typeDescriptions": {
|
|
522
|
+
"typeIdentifier": "t_address",
|
|
523
|
+
"typeString": "address"
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"visibility": "internal"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"constant": false,
|
|
530
|
+
"id": 8676,
|
|
531
|
+
"mutability": "mutable",
|
|
532
|
+
"name": "_minScore",
|
|
533
|
+
"nameLocation": "479:9:29",
|
|
534
|
+
"nodeType": "VariableDeclaration",
|
|
535
|
+
"scope": 8690,
|
|
536
|
+
"src": "471:17:29",
|
|
537
|
+
"stateVariable": false,
|
|
538
|
+
"storageLocation": "default",
|
|
539
|
+
"typeDescriptions": {
|
|
540
|
+
"typeIdentifier": "t_uint256",
|
|
541
|
+
"typeString": "uint256"
|
|
542
|
+
},
|
|
543
|
+
"typeName": {
|
|
544
|
+
"id": 8675,
|
|
545
|
+
"name": "uint256",
|
|
546
|
+
"nodeType": "ElementaryTypeName",
|
|
547
|
+
"src": "471:7:29",
|
|
548
|
+
"typeDescriptions": {
|
|
549
|
+
"typeIdentifier": "t_uint256",
|
|
550
|
+
"typeString": "uint256"
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"visibility": "internal"
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
"src": "451:38:29"
|
|
557
|
+
},
|
|
558
|
+
"returnParameters": {
|
|
559
|
+
"id": 8678,
|
|
560
|
+
"nodeType": "ParameterList",
|
|
561
|
+
"parameters": [],
|
|
562
|
+
"src": "490:0:29"
|
|
563
|
+
},
|
|
564
|
+
"scope": 8730,
|
|
565
|
+
"src": "440:143:29",
|
|
566
|
+
"stateMutability": "nonpayable",
|
|
567
|
+
"virtual": false,
|
|
568
|
+
"visibility": "internal"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"body": {
|
|
572
|
+
"id": 8718,
|
|
573
|
+
"nodeType": "Block",
|
|
574
|
+
"src": "614:245:29",
|
|
575
|
+
"statements": [
|
|
576
|
+
{
|
|
577
|
+
"assignments": [
|
|
578
|
+
8693
|
|
579
|
+
],
|
|
580
|
+
"declarations": [
|
|
581
|
+
{
|
|
582
|
+
"constant": false,
|
|
583
|
+
"id": 8693,
|
|
584
|
+
"mutability": "mutable",
|
|
585
|
+
"name": "userScore",
|
|
586
|
+
"nameLocation": "633:9:29",
|
|
587
|
+
"nodeType": "VariableDeclaration",
|
|
588
|
+
"scope": 8718,
|
|
589
|
+
"src": "625:17:29",
|
|
590
|
+
"stateVariable": false,
|
|
591
|
+
"storageLocation": "default",
|
|
592
|
+
"typeDescriptions": {
|
|
593
|
+
"typeIdentifier": "t_uint256",
|
|
594
|
+
"typeString": "uint256"
|
|
595
|
+
},
|
|
596
|
+
"typeName": {
|
|
597
|
+
"id": 8692,
|
|
598
|
+
"name": "uint256",
|
|
599
|
+
"nodeType": "ElementaryTypeName",
|
|
600
|
+
"src": "625:7:29",
|
|
601
|
+
"typeDescriptions": {
|
|
602
|
+
"typeIdentifier": "t_uint256",
|
|
603
|
+
"typeString": "uint256"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"visibility": "internal"
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
"id": 8699,
|
|
610
|
+
"initialValue": {
|
|
611
|
+
"arguments": [
|
|
612
|
+
{
|
|
613
|
+
"expression": {
|
|
614
|
+
"id": 8696,
|
|
615
|
+
"name": "msg",
|
|
616
|
+
"nodeType": "Identifier",
|
|
617
|
+
"overloadedDeclarations": [],
|
|
618
|
+
"referencedDeclaration": 4294967281,
|
|
619
|
+
"src": "663:3:29",
|
|
620
|
+
"typeDescriptions": {
|
|
621
|
+
"typeIdentifier": "t_magic_message",
|
|
622
|
+
"typeString": "msg"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"id": 8697,
|
|
626
|
+
"isConstant": false,
|
|
627
|
+
"isLValue": false,
|
|
628
|
+
"isPure": false,
|
|
629
|
+
"lValueRequested": false,
|
|
630
|
+
"memberLocation": "667:6:29",
|
|
631
|
+
"memberName": "sender",
|
|
632
|
+
"nodeType": "MemberAccess",
|
|
633
|
+
"src": "663:10:29",
|
|
634
|
+
"typeDescriptions": {
|
|
635
|
+
"typeIdentifier": "t_address",
|
|
636
|
+
"typeString": "address"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"expression": {
|
|
641
|
+
"argumentTypes": [
|
|
642
|
+
{
|
|
643
|
+
"typeIdentifier": "t_address",
|
|
644
|
+
"typeString": "address"
|
|
645
|
+
}
|
|
646
|
+
],
|
|
647
|
+
"expression": {
|
|
648
|
+
"id": 8694,
|
|
649
|
+
"name": "registry",
|
|
650
|
+
"nodeType": "Identifier",
|
|
651
|
+
"overloadedDeclarations": [],
|
|
652
|
+
"referencedDeclaration": 8658,
|
|
653
|
+
"src": "645:8:29",
|
|
654
|
+
"typeDescriptions": {
|
|
655
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
656
|
+
"typeString": "contract TrustRegistry"
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
"id": 8695,
|
|
660
|
+
"isConstant": false,
|
|
661
|
+
"isLValue": false,
|
|
662
|
+
"isPure": false,
|
|
663
|
+
"lValueRequested": false,
|
|
664
|
+
"memberLocation": "654:8:29",
|
|
665
|
+
"memberName": "getScore",
|
|
666
|
+
"nodeType": "MemberAccess",
|
|
667
|
+
"referencedDeclaration": 9099,
|
|
668
|
+
"src": "645:17:29",
|
|
669
|
+
"typeDescriptions": {
|
|
670
|
+
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$",
|
|
671
|
+
"typeString": "function (address) view external returns (uint256)"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"id": 8698,
|
|
675
|
+
"isConstant": false,
|
|
676
|
+
"isLValue": false,
|
|
677
|
+
"isPure": false,
|
|
678
|
+
"kind": "functionCall",
|
|
679
|
+
"lValueRequested": false,
|
|
680
|
+
"nameLocations": [],
|
|
681
|
+
"names": [],
|
|
682
|
+
"nodeType": "FunctionCall",
|
|
683
|
+
"src": "645:29:29",
|
|
684
|
+
"tryCall": false,
|
|
685
|
+
"typeDescriptions": {
|
|
686
|
+
"typeIdentifier": "t_uint256",
|
|
687
|
+
"typeString": "uint256"
|
|
688
|
+
}
|
|
689
|
+
},
|
|
690
|
+
"nodeType": "VariableDeclarationStatement",
|
|
691
|
+
"src": "625:49:29"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"expression": {
|
|
695
|
+
"arguments": [
|
|
696
|
+
{
|
|
697
|
+
"id": 8706,
|
|
698
|
+
"isConstant": false,
|
|
699
|
+
"isLValue": false,
|
|
700
|
+
"isPure": false,
|
|
701
|
+
"lValueRequested": false,
|
|
702
|
+
"nodeType": "UnaryOperation",
|
|
703
|
+
"operator": "!",
|
|
704
|
+
"prefix": true,
|
|
705
|
+
"src": "703:35:29",
|
|
706
|
+
"subExpression": {
|
|
707
|
+
"arguments": [
|
|
708
|
+
{
|
|
709
|
+
"expression": {
|
|
710
|
+
"id": 8703,
|
|
711
|
+
"name": "msg",
|
|
712
|
+
"nodeType": "Identifier",
|
|
713
|
+
"overloadedDeclarations": [],
|
|
714
|
+
"referencedDeclaration": 4294967281,
|
|
715
|
+
"src": "727:3:29",
|
|
716
|
+
"typeDescriptions": {
|
|
717
|
+
"typeIdentifier": "t_magic_message",
|
|
718
|
+
"typeString": "msg"
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
"id": 8704,
|
|
722
|
+
"isConstant": false,
|
|
723
|
+
"isLValue": false,
|
|
724
|
+
"isPure": false,
|
|
725
|
+
"lValueRequested": false,
|
|
726
|
+
"memberLocation": "731:6:29",
|
|
727
|
+
"memberName": "sender",
|
|
728
|
+
"nodeType": "MemberAccess",
|
|
729
|
+
"src": "727:10:29",
|
|
730
|
+
"typeDescriptions": {
|
|
731
|
+
"typeIdentifier": "t_address",
|
|
732
|
+
"typeString": "address"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"expression": {
|
|
737
|
+
"argumentTypes": [
|
|
738
|
+
{
|
|
739
|
+
"typeIdentifier": "t_address",
|
|
740
|
+
"typeString": "address"
|
|
741
|
+
}
|
|
742
|
+
],
|
|
743
|
+
"expression": {
|
|
744
|
+
"id": 8701,
|
|
745
|
+
"name": "registry",
|
|
746
|
+
"nodeType": "Identifier",
|
|
747
|
+
"overloadedDeclarations": [],
|
|
748
|
+
"referencedDeclaration": 8658,
|
|
749
|
+
"src": "704:8:29",
|
|
750
|
+
"typeDescriptions": {
|
|
751
|
+
"typeIdentifier": "t_contract$_TrustRegistry_$10051",
|
|
752
|
+
"typeString": "contract TrustRegistry"
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
"id": 8702,
|
|
756
|
+
"isConstant": false,
|
|
757
|
+
"isLValue": false,
|
|
758
|
+
"isPure": false,
|
|
759
|
+
"lValueRequested": false,
|
|
760
|
+
"memberLocation": "713:13:29",
|
|
761
|
+
"memberName": "isBlacklisted",
|
|
762
|
+
"nodeType": "MemberAccess",
|
|
763
|
+
"referencedDeclaration": 9149,
|
|
764
|
+
"src": "704:22:29",
|
|
765
|
+
"typeDescriptions": {
|
|
766
|
+
"typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
|
|
767
|
+
"typeString": "function (address) view external returns (bool)"
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
"id": 8705,
|
|
771
|
+
"isConstant": false,
|
|
772
|
+
"isLValue": false,
|
|
773
|
+
"isPure": false,
|
|
774
|
+
"kind": "functionCall",
|
|
775
|
+
"lValueRequested": false,
|
|
776
|
+
"nameLocations": [],
|
|
777
|
+
"names": [],
|
|
778
|
+
"nodeType": "FunctionCall",
|
|
779
|
+
"src": "704:34:29",
|
|
780
|
+
"tryCall": false,
|
|
781
|
+
"typeDescriptions": {
|
|
782
|
+
"typeIdentifier": "t_bool",
|
|
783
|
+
"typeString": "bool"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
"typeDescriptions": {
|
|
787
|
+
"typeIdentifier": "t_bool",
|
|
788
|
+
"typeString": "bool"
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"hexValue": "4164647265737320626c61636b6c6973746564",
|
|
793
|
+
"id": 8707,
|
|
794
|
+
"isConstant": false,
|
|
795
|
+
"isLValue": false,
|
|
796
|
+
"isPure": true,
|
|
797
|
+
"kind": "string",
|
|
798
|
+
"lValueRequested": false,
|
|
799
|
+
"nodeType": "Literal",
|
|
800
|
+
"src": "740:21:29",
|
|
801
|
+
"typeDescriptions": {
|
|
802
|
+
"typeIdentifier": "t_stringliteral_6d54ff89c38bd80dce3de6c88eb9ac19e1cc5e389cfd046cf899f029f448cf93",
|
|
803
|
+
"typeString": "literal_string \"Address blacklisted\""
|
|
804
|
+
},
|
|
805
|
+
"value": "Address blacklisted"
|
|
806
|
+
}
|
|
807
|
+
],
|
|
808
|
+
"expression": {
|
|
809
|
+
"argumentTypes": [
|
|
810
|
+
{
|
|
811
|
+
"typeIdentifier": "t_bool",
|
|
812
|
+
"typeString": "bool"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"typeIdentifier": "t_stringliteral_6d54ff89c38bd80dce3de6c88eb9ac19e1cc5e389cfd046cf899f029f448cf93",
|
|
816
|
+
"typeString": "literal_string \"Address blacklisted\""
|
|
817
|
+
}
|
|
818
|
+
],
|
|
819
|
+
"id": 8700,
|
|
820
|
+
"name": "require",
|
|
821
|
+
"nodeType": "Identifier",
|
|
822
|
+
"overloadedDeclarations": [
|
|
823
|
+
4294967278,
|
|
824
|
+
4294967278
|
|
825
|
+
],
|
|
826
|
+
"referencedDeclaration": 4294967278,
|
|
827
|
+
"src": "695:7:29",
|
|
828
|
+
"typeDescriptions": {
|
|
829
|
+
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
830
|
+
"typeString": "function (bool,string memory) pure"
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"id": 8708,
|
|
834
|
+
"isConstant": false,
|
|
835
|
+
"isLValue": false,
|
|
836
|
+
"isPure": false,
|
|
837
|
+
"kind": "functionCall",
|
|
838
|
+
"lValueRequested": false,
|
|
839
|
+
"nameLocations": [],
|
|
840
|
+
"names": [],
|
|
841
|
+
"nodeType": "FunctionCall",
|
|
842
|
+
"src": "695:67:29",
|
|
843
|
+
"tryCall": false,
|
|
844
|
+
"typeDescriptions": {
|
|
845
|
+
"typeIdentifier": "t_tuple$__$",
|
|
846
|
+
"typeString": "tuple()"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
"id": 8709,
|
|
850
|
+
"nodeType": "ExpressionStatement",
|
|
851
|
+
"src": "695:67:29"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"expression": {
|
|
855
|
+
"arguments": [
|
|
856
|
+
{
|
|
857
|
+
"commonType": {
|
|
858
|
+
"typeIdentifier": "t_uint256",
|
|
859
|
+
"typeString": "uint256"
|
|
860
|
+
},
|
|
861
|
+
"id": 8713,
|
|
862
|
+
"isConstant": false,
|
|
863
|
+
"isLValue": false,
|
|
864
|
+
"isPure": false,
|
|
865
|
+
"lValueRequested": false,
|
|
866
|
+
"leftExpression": {
|
|
867
|
+
"id": 8711,
|
|
868
|
+
"name": "userScore",
|
|
869
|
+
"nodeType": "Identifier",
|
|
870
|
+
"overloadedDeclarations": [],
|
|
871
|
+
"referencedDeclaration": 8693,
|
|
872
|
+
"src": "781:9:29",
|
|
873
|
+
"typeDescriptions": {
|
|
874
|
+
"typeIdentifier": "t_uint256",
|
|
875
|
+
"typeString": "uint256"
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
"nodeType": "BinaryOperation",
|
|
879
|
+
"operator": ">=",
|
|
880
|
+
"rightExpression": {
|
|
881
|
+
"id": 8712,
|
|
882
|
+
"name": "minRequiredScore",
|
|
883
|
+
"nodeType": "Identifier",
|
|
884
|
+
"overloadedDeclarations": [],
|
|
885
|
+
"referencedDeclaration": 8660,
|
|
886
|
+
"src": "794:16:29",
|
|
887
|
+
"typeDescriptions": {
|
|
888
|
+
"typeIdentifier": "t_uint256",
|
|
889
|
+
"typeString": "uint256"
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
"src": "781:29:29",
|
|
893
|
+
"typeDescriptions": {
|
|
894
|
+
"typeIdentifier": "t_bool",
|
|
895
|
+
"typeString": "bool"
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"hexValue": "496e73756666696369656e742074727573742073636f7265",
|
|
900
|
+
"id": 8714,
|
|
901
|
+
"isConstant": false,
|
|
902
|
+
"isLValue": false,
|
|
903
|
+
"isPure": true,
|
|
904
|
+
"kind": "string",
|
|
905
|
+
"lValueRequested": false,
|
|
906
|
+
"nodeType": "Literal",
|
|
907
|
+
"src": "812:26:29",
|
|
908
|
+
"typeDescriptions": {
|
|
909
|
+
"typeIdentifier": "t_stringliteral_dcab91c805d9a1ae9c27359f57f8769b6e8a6def10a4b7b5105a8ab5100ffac2",
|
|
910
|
+
"typeString": "literal_string \"Insufficient trust score\""
|
|
911
|
+
},
|
|
912
|
+
"value": "Insufficient trust score"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
"expression": {
|
|
916
|
+
"argumentTypes": [
|
|
917
|
+
{
|
|
918
|
+
"typeIdentifier": "t_bool",
|
|
919
|
+
"typeString": "bool"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"typeIdentifier": "t_stringliteral_dcab91c805d9a1ae9c27359f57f8769b6e8a6def10a4b7b5105a8ab5100ffac2",
|
|
923
|
+
"typeString": "literal_string \"Insufficient trust score\""
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"id": 8710,
|
|
927
|
+
"name": "require",
|
|
928
|
+
"nodeType": "Identifier",
|
|
929
|
+
"overloadedDeclarations": [
|
|
930
|
+
4294967278,
|
|
931
|
+
4294967278
|
|
932
|
+
],
|
|
933
|
+
"referencedDeclaration": 4294967278,
|
|
934
|
+
"src": "773:7:29",
|
|
935
|
+
"typeDescriptions": {
|
|
936
|
+
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
937
|
+
"typeString": "function (bool,string memory) pure"
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
"id": 8715,
|
|
941
|
+
"isConstant": false,
|
|
942
|
+
"isLValue": false,
|
|
943
|
+
"isPure": false,
|
|
944
|
+
"kind": "functionCall",
|
|
945
|
+
"lValueRequested": false,
|
|
946
|
+
"nameLocations": [],
|
|
947
|
+
"names": [],
|
|
948
|
+
"nodeType": "FunctionCall",
|
|
949
|
+
"src": "773:66:29",
|
|
950
|
+
"tryCall": false,
|
|
951
|
+
"typeDescriptions": {
|
|
952
|
+
"typeIdentifier": "t_tuple$__$",
|
|
953
|
+
"typeString": "tuple()"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
"id": 8716,
|
|
957
|
+
"nodeType": "ExpressionStatement",
|
|
958
|
+
"src": "773:66:29"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"id": 8717,
|
|
962
|
+
"nodeType": "PlaceholderStatement",
|
|
963
|
+
"src": "850:1:29"
|
|
964
|
+
}
|
|
965
|
+
]
|
|
966
|
+
},
|
|
967
|
+
"id": 8719,
|
|
968
|
+
"name": "onlyTrusted",
|
|
969
|
+
"nameLocation": "600:11:29",
|
|
970
|
+
"nodeType": "ModifierDefinition",
|
|
971
|
+
"parameters": {
|
|
972
|
+
"id": 8691,
|
|
973
|
+
"nodeType": "ParameterList",
|
|
974
|
+
"parameters": [],
|
|
975
|
+
"src": "611:2:29"
|
|
976
|
+
},
|
|
977
|
+
"src": "591:268:29",
|
|
978
|
+
"virtual": false,
|
|
979
|
+
"visibility": "internal"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"body": {
|
|
983
|
+
"id": 8728,
|
|
984
|
+
"nodeType": "Block",
|
|
985
|
+
"src": "922:50:29",
|
|
986
|
+
"statements": [
|
|
987
|
+
{
|
|
988
|
+
"expression": {
|
|
989
|
+
"id": 8726,
|
|
990
|
+
"isConstant": false,
|
|
991
|
+
"isLValue": false,
|
|
992
|
+
"isPure": false,
|
|
993
|
+
"lValueRequested": false,
|
|
994
|
+
"leftHandSide": {
|
|
995
|
+
"id": 8724,
|
|
996
|
+
"name": "minRequiredScore",
|
|
997
|
+
"nodeType": "Identifier",
|
|
998
|
+
"overloadedDeclarations": [],
|
|
999
|
+
"referencedDeclaration": 8660,
|
|
1000
|
+
"src": "933:16:29",
|
|
1001
|
+
"typeDescriptions": {
|
|
1002
|
+
"typeIdentifier": "t_uint256",
|
|
1003
|
+
"typeString": "uint256"
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
"nodeType": "Assignment",
|
|
1007
|
+
"operator": "=",
|
|
1008
|
+
"rightHandSide": {
|
|
1009
|
+
"id": 8725,
|
|
1010
|
+
"name": "_newMinScore",
|
|
1011
|
+
"nodeType": "Identifier",
|
|
1012
|
+
"overloadedDeclarations": [],
|
|
1013
|
+
"referencedDeclaration": 8721,
|
|
1014
|
+
"src": "952:12:29",
|
|
1015
|
+
"typeDescriptions": {
|
|
1016
|
+
"typeIdentifier": "t_uint256",
|
|
1017
|
+
"typeString": "uint256"
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
"src": "933:31:29",
|
|
1021
|
+
"typeDescriptions": {
|
|
1022
|
+
"typeIdentifier": "t_uint256",
|
|
1023
|
+
"typeString": "uint256"
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"id": 8727,
|
|
1027
|
+
"nodeType": "ExpressionStatement",
|
|
1028
|
+
"src": "933:31:29"
|
|
1029
|
+
}
|
|
1030
|
+
]
|
|
1031
|
+
},
|
|
1032
|
+
"id": 8729,
|
|
1033
|
+
"implemented": true,
|
|
1034
|
+
"kind": "function",
|
|
1035
|
+
"modifiers": [],
|
|
1036
|
+
"name": "updateMinScore",
|
|
1037
|
+
"nameLocation": "876:14:29",
|
|
1038
|
+
"nodeType": "FunctionDefinition",
|
|
1039
|
+
"parameters": {
|
|
1040
|
+
"id": 8722,
|
|
1041
|
+
"nodeType": "ParameterList",
|
|
1042
|
+
"parameters": [
|
|
1043
|
+
{
|
|
1044
|
+
"constant": false,
|
|
1045
|
+
"id": 8721,
|
|
1046
|
+
"mutability": "mutable",
|
|
1047
|
+
"name": "_newMinScore",
|
|
1048
|
+
"nameLocation": "899:12:29",
|
|
1049
|
+
"nodeType": "VariableDeclaration",
|
|
1050
|
+
"scope": 8729,
|
|
1051
|
+
"src": "891:20:29",
|
|
1052
|
+
"stateVariable": false,
|
|
1053
|
+
"storageLocation": "default",
|
|
1054
|
+
"typeDescriptions": {
|
|
1055
|
+
"typeIdentifier": "t_uint256",
|
|
1056
|
+
"typeString": "uint256"
|
|
1057
|
+
},
|
|
1058
|
+
"typeName": {
|
|
1059
|
+
"id": 8720,
|
|
1060
|
+
"name": "uint256",
|
|
1061
|
+
"nodeType": "ElementaryTypeName",
|
|
1062
|
+
"src": "891:7:29",
|
|
1063
|
+
"typeDescriptions": {
|
|
1064
|
+
"typeIdentifier": "t_uint256",
|
|
1065
|
+
"typeString": "uint256"
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"visibility": "internal"
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
"src": "890:22:29"
|
|
1072
|
+
},
|
|
1073
|
+
"returnParameters": {
|
|
1074
|
+
"id": 8723,
|
|
1075
|
+
"nodeType": "ParameterList",
|
|
1076
|
+
"parameters": [],
|
|
1077
|
+
"src": "922:0:29"
|
|
1078
|
+
},
|
|
1079
|
+
"scope": 8730,
|
|
1080
|
+
"src": "867:105:29",
|
|
1081
|
+
"stateMutability": "nonpayable",
|
|
1082
|
+
"virtual": false,
|
|
1083
|
+
"visibility": "internal"
|
|
1084
|
+
}
|
|
1085
|
+
],
|
|
1086
|
+
"scope": 8731,
|
|
1087
|
+
"src": "191:784:29",
|
|
1088
|
+
"usedErrors": [
|
|
1089
|
+
8668,
|
|
1090
|
+
8672
|
|
1091
|
+
],
|
|
1092
|
+
"usedEvents": []
|
|
1093
|
+
}
|
|
1094
|
+
],
|
|
1095
|
+
"src": "33:944:29"
|
|
1096
|
+
},
|
|
1097
|
+
"compiler": {
|
|
1098
|
+
"name": "solc",
|
|
1099
|
+
"version": "0.8.21+commit.d9974bed.Emscripten.clang"
|
|
1100
|
+
},
|
|
1101
|
+
"networks": {},
|
|
1102
|
+
"schemaVersion": "3.4.16",
|
|
1103
|
+
"updatedAt": "2026-01-24T20:23:04.340Z",
|
|
1104
|
+
"devdoc": {
|
|
1105
|
+
"details": "Base contract to provide trust-score based access control.",
|
|
1106
|
+
"kind": "dev",
|
|
1107
|
+
"methods": {},
|
|
1108
|
+
"title": "Guardian",
|
|
1109
|
+
"version": 1
|
|
1110
|
+
},
|
|
1111
|
+
"userdoc": {
|
|
1112
|
+
"kind": "user",
|
|
1113
|
+
"methods": {},
|
|
1114
|
+
"version": 1
|
|
1115
|
+
}
|
|
1116
|
+
}
|