@clearproof/contracts 0.1.0 → 0.3.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/README.md +35 -0
- package/artifacts/contracts/ComplianceRegistry.sol/ComplianceRegistry.json +4 -4
- package/artifacts/contracts/ComplianceRegistry.sol/IGroth16Verifier.json +2 -2
- package/artifacts/contracts/Groth16Verifier.sol/Groth16Verifier.json +4 -4
- package/artifacts/contracts/ISanctionsRootReceiver.sol/ISanctionsRootReceiver.json +29 -0
- package/artifacts/contracts/SanctionsOracle.sol/SanctionsOracle.json +2 -2
- package/artifacts/contracts/SanctionsRootRelay.sol/SanctionsRootRelay.json +321 -0
- package/artifacts/contracts/VASPRegistry.sol/VASPRegistry.json +87 -2
- package/contracts/ComplianceRegistry.sol +22 -7
- package/contracts/Groth16Verifier.sol +50 -43
- package/contracts/ISanctionsRootReceiver.sol +14 -0
- package/contracts/SanctionsOracle.sol +2 -0
- package/contracts/SanctionsRootRelay.sol +48 -0
- package/contracts/VASPRegistry.sol +27 -4
- package/package.json +7 -3
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "SanctionsRootRelay",
|
|
4
|
+
"sourceName": "contracts/SanctionsRootRelay.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "admin",
|
|
11
|
+
"type": "address"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address",
|
|
15
|
+
"name": "oracleAddress",
|
|
16
|
+
"type": "address"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "nonpayable",
|
|
20
|
+
"type": "constructor"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"inputs": [],
|
|
24
|
+
"name": "AccessControlBadConfirmation",
|
|
25
|
+
"type": "error"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"inputs": [
|
|
29
|
+
{
|
|
30
|
+
"internalType": "address",
|
|
31
|
+
"name": "account",
|
|
32
|
+
"type": "address"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"internalType": "bytes32",
|
|
36
|
+
"name": "neededRole",
|
|
37
|
+
"type": "bytes32"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"name": "AccessControlUnauthorizedAccount",
|
|
41
|
+
"type": "error"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"anonymous": false,
|
|
45
|
+
"inputs": [
|
|
46
|
+
{
|
|
47
|
+
"indexed": true,
|
|
48
|
+
"internalType": "bytes32",
|
|
49
|
+
"name": "role",
|
|
50
|
+
"type": "bytes32"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"indexed": true,
|
|
54
|
+
"internalType": "bytes32",
|
|
55
|
+
"name": "previousAdminRole",
|
|
56
|
+
"type": "bytes32"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"indexed": true,
|
|
60
|
+
"internalType": "bytes32",
|
|
61
|
+
"name": "newAdminRole",
|
|
62
|
+
"type": "bytes32"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"name": "RoleAdminChanged",
|
|
66
|
+
"type": "event"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"anonymous": false,
|
|
70
|
+
"inputs": [
|
|
71
|
+
{
|
|
72
|
+
"indexed": true,
|
|
73
|
+
"internalType": "bytes32",
|
|
74
|
+
"name": "role",
|
|
75
|
+
"type": "bytes32"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"indexed": true,
|
|
79
|
+
"internalType": "address",
|
|
80
|
+
"name": "account",
|
|
81
|
+
"type": "address"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"indexed": true,
|
|
85
|
+
"internalType": "address",
|
|
86
|
+
"name": "sender",
|
|
87
|
+
"type": "address"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"name": "RoleGranted",
|
|
91
|
+
"type": "event"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"anonymous": false,
|
|
95
|
+
"inputs": [
|
|
96
|
+
{
|
|
97
|
+
"indexed": true,
|
|
98
|
+
"internalType": "bytes32",
|
|
99
|
+
"name": "role",
|
|
100
|
+
"type": "bytes32"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"indexed": true,
|
|
104
|
+
"internalType": "address",
|
|
105
|
+
"name": "account",
|
|
106
|
+
"type": "address"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"indexed": true,
|
|
110
|
+
"internalType": "address",
|
|
111
|
+
"name": "sender",
|
|
112
|
+
"type": "address"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"name": "RoleRevoked",
|
|
116
|
+
"type": "event"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"anonymous": false,
|
|
120
|
+
"inputs": [
|
|
121
|
+
{
|
|
122
|
+
"indexed": true,
|
|
123
|
+
"internalType": "bytes32",
|
|
124
|
+
"name": "root",
|
|
125
|
+
"type": "bytes32"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"indexed": false,
|
|
129
|
+
"internalType": "uint32",
|
|
130
|
+
"name": "leafCount",
|
|
131
|
+
"type": "uint32"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"indexed": true,
|
|
135
|
+
"internalType": "address",
|
|
136
|
+
"name": "relayer",
|
|
137
|
+
"type": "address"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"name": "RootRelayed",
|
|
141
|
+
"type": "event"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [],
|
|
145
|
+
"name": "DEFAULT_ADMIN_ROLE",
|
|
146
|
+
"outputs": [
|
|
147
|
+
{
|
|
148
|
+
"internalType": "bytes32",
|
|
149
|
+
"name": "",
|
|
150
|
+
"type": "bytes32"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"stateMutability": "view",
|
|
154
|
+
"type": "function"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [],
|
|
158
|
+
"name": "RELAYER_ROLE",
|
|
159
|
+
"outputs": [
|
|
160
|
+
{
|
|
161
|
+
"internalType": "bytes32",
|
|
162
|
+
"name": "",
|
|
163
|
+
"type": "bytes32"
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"stateMutability": "view",
|
|
167
|
+
"type": "function"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"inputs": [
|
|
171
|
+
{
|
|
172
|
+
"internalType": "bytes32",
|
|
173
|
+
"name": "role",
|
|
174
|
+
"type": "bytes32"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"name": "getRoleAdmin",
|
|
178
|
+
"outputs": [
|
|
179
|
+
{
|
|
180
|
+
"internalType": "bytes32",
|
|
181
|
+
"name": "",
|
|
182
|
+
"type": "bytes32"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"stateMutability": "view",
|
|
186
|
+
"type": "function"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"inputs": [
|
|
190
|
+
{
|
|
191
|
+
"internalType": "bytes32",
|
|
192
|
+
"name": "role",
|
|
193
|
+
"type": "bytes32"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"internalType": "address",
|
|
197
|
+
"name": "account",
|
|
198
|
+
"type": "address"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"name": "grantRole",
|
|
202
|
+
"outputs": [],
|
|
203
|
+
"stateMutability": "nonpayable",
|
|
204
|
+
"type": "function"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"inputs": [
|
|
208
|
+
{
|
|
209
|
+
"internalType": "bytes32",
|
|
210
|
+
"name": "role",
|
|
211
|
+
"type": "bytes32"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"internalType": "address",
|
|
215
|
+
"name": "account",
|
|
216
|
+
"type": "address"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"name": "hasRole",
|
|
220
|
+
"outputs": [
|
|
221
|
+
{
|
|
222
|
+
"internalType": "bool",
|
|
223
|
+
"name": "",
|
|
224
|
+
"type": "bool"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"stateMutability": "view",
|
|
228
|
+
"type": "function"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"inputs": [],
|
|
232
|
+
"name": "oracle",
|
|
233
|
+
"outputs": [
|
|
234
|
+
{
|
|
235
|
+
"internalType": "contract SanctionsOracle",
|
|
236
|
+
"name": "",
|
|
237
|
+
"type": "address"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"stateMutability": "view",
|
|
241
|
+
"type": "function"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"inputs": [
|
|
245
|
+
{
|
|
246
|
+
"internalType": "bytes32",
|
|
247
|
+
"name": "newRoot",
|
|
248
|
+
"type": "bytes32"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"internalType": "uint32",
|
|
252
|
+
"name": "leafCount",
|
|
253
|
+
"type": "uint32"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"name": "receiveRoot",
|
|
257
|
+
"outputs": [],
|
|
258
|
+
"stateMutability": "nonpayable",
|
|
259
|
+
"type": "function"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"inputs": [
|
|
263
|
+
{
|
|
264
|
+
"internalType": "bytes32",
|
|
265
|
+
"name": "role",
|
|
266
|
+
"type": "bytes32"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"internalType": "address",
|
|
270
|
+
"name": "callerConfirmation",
|
|
271
|
+
"type": "address"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"name": "renounceRole",
|
|
275
|
+
"outputs": [],
|
|
276
|
+
"stateMutability": "nonpayable",
|
|
277
|
+
"type": "function"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [
|
|
281
|
+
{
|
|
282
|
+
"internalType": "bytes32",
|
|
283
|
+
"name": "role",
|
|
284
|
+
"type": "bytes32"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"internalType": "address",
|
|
288
|
+
"name": "account",
|
|
289
|
+
"type": "address"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"name": "revokeRole",
|
|
293
|
+
"outputs": [],
|
|
294
|
+
"stateMutability": "nonpayable",
|
|
295
|
+
"type": "function"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"inputs": [
|
|
299
|
+
{
|
|
300
|
+
"internalType": "bytes4",
|
|
301
|
+
"name": "interfaceId",
|
|
302
|
+
"type": "bytes4"
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"name": "supportsInterface",
|
|
306
|
+
"outputs": [
|
|
307
|
+
{
|
|
308
|
+
"internalType": "bool",
|
|
309
|
+
"name": "",
|
|
310
|
+
"type": "bool"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"stateMutability": "view",
|
|
314
|
+
"type": "function"
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"bytecode": "0x60a060405234801561001057600080fd5b506040516107fb3803806107fb83398101604081905261002f916101cc565b6001600160a01b0382166100775760405162461bcd60e51b815260206004820152600a6024820152692d32b9379030b236b4b760b11b60448201526064015b60405180910390fd5b6001600160a01b0381166100bb5760405162461bcd60e51b815260206004820152600b60248201526a5a65726f206f7261636c6560a81b604482015260640161006e565b6100c6600083610104565b506100f17fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc483610104565b506001600160a01b0316608052506101ff565b6000828152602081815260408083206001600160a01b038516845290915281205460ff166101a6576000838152602081815260408083206001600160a01b03861684529091529020805460ff1916600117905561015e3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101aa565b5060005b92915050565b80516001600160a01b03811681146101c757600080fd5b919050565b600080604083850312156101df57600080fd5b6101e8836101b0565b91506101f6602084016101b0565b90509250929050565b6080516105da6102216000396000818161013c015261024e01526105da6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637dc0d1d0116100665780637dc0d1d01461013757806391d1485414610176578063926d7d7f14610189578063a217fddf146101b0578063d547741f146101b857600080fd5b806301ffc9a7146100a357806307ba869a146100cb578063248a9ca3146100e05780632f2ff15d1461011157806336568abe14610124575b600080fd5b6100b66100b13660046104f0565b6101cb565b60405190151581526020015b60405180910390f35b6100de6100d9366004610521565b610202565b005b6101036100ee36600461055a565b60009081526020819052604090206001015490565b6040519081526020016100c2565b6100de61011f366004610573565b6102f4565b6100de610132366004610573565b61031f565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100b6610184366004610573565b610357565b6101037fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc481565b610103600081565b6100de6101c6366004610573565b610380565b60006001600160e01b03198216637965db0b60e01b14806101fc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b7fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc461022c816103a5565b604051639f59e11f60e01b81526004810184905263ffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639f59e11f90604401600060405180830381600087803b15801561029a57600080fd5b505af11580156102ae573d6000803e3d6000fd5b505060405163ffffffff851681523392508591507fe4c5e2b5eaec8c0534190e73a2e76bf487b96521d6765d757c7c79ae2f2f66e59060200160405180910390a3505050565b60008281526020819052604090206001015461030f816103a5565b61031983836103b2565b50505050565b6001600160a01b03811633146103485760405163334bd91960e11b815260040160405180910390fd5b6103528282610444565b505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008281526020819052604090206001015461039b816103a5565b6103198383610444565b6103af81336104af565b50565b60006103be8383610357565b61043c576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556103f43390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101fc565b5060006101fc565b60006104508383610357565b1561043c576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016101fc565b6104b98282610357565b6104ec5760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b5050565b60006020828403121561050257600080fd5b81356001600160e01b03198116811461051a57600080fd5b9392505050565b6000806040838503121561053457600080fd5b82359150602083013563ffffffff8116811461054f57600080fd5b809150509250929050565b60006020828403121561056c57600080fd5b5035919050565b6000806040838503121561058657600080fd5b8235915060208301356001600160a01b038116811461054f57600080fdfea2646970667358221220960554634bd526ef9b060803dc5d77bc4f94dc6be611d303ceb22a1533e42f1f64736f6c63430008180033",
|
|
318
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80637dc0d1d0116100665780637dc0d1d01461013757806391d1485414610176578063926d7d7f14610189578063a217fddf146101b0578063d547741f146101b857600080fd5b806301ffc9a7146100a357806307ba869a146100cb578063248a9ca3146100e05780632f2ff15d1461011157806336568abe14610124575b600080fd5b6100b66100b13660046104f0565b6101cb565b60405190151581526020015b60405180910390f35b6100de6100d9366004610521565b610202565b005b6101036100ee36600461055a565b60009081526020819052604090206001015490565b6040519081526020016100c2565b6100de61011f366004610573565b6102f4565b6100de610132366004610573565b61031f565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100b6610184366004610573565b610357565b6101037fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc481565b610103600081565b6100de6101c6366004610573565b610380565b60006001600160e01b03198216637965db0b60e01b14806101fc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b7fe2b7fb3b832174769106daebcfd6d1970523240dda11281102db9363b83b0dc461022c816103a5565b604051639f59e11f60e01b81526004810184905263ffffffff831660248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639f59e11f90604401600060405180830381600087803b15801561029a57600080fd5b505af11580156102ae573d6000803e3d6000fd5b505060405163ffffffff851681523392508591507fe4c5e2b5eaec8c0534190e73a2e76bf487b96521d6765d757c7c79ae2f2f66e59060200160405180910390a3505050565b60008281526020819052604090206001015461030f816103a5565b61031983836103b2565b50505050565b6001600160a01b03811633146103485760405163334bd91960e11b815260040160405180910390fd5b6103528282610444565b505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008281526020819052604090206001015461039b816103a5565b6103198383610444565b6103af81336104af565b50565b60006103be8383610357565b61043c576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556103f43390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101fc565b5060006101fc565b60006104508383610357565b1561043c576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016101fc565b6104b98282610357565b6104ec5760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b5050565b60006020828403121561050257600080fd5b81356001600160e01b03198116811461051a57600080fd5b9392505050565b6000806040838503121561053457600080fd5b82359150602083013563ffffffff8116811461054f57600080fd5b809150509250929050565b60006020828403121561056c57600080fd5b5035919050565b6000806040838503121561058657600080fd5b8235915060208301356001600160a01b038116811461054f57600080fdfea2646970667358221220960554634bd526ef9b060803dc5d77bc4f94dc6be611d303ceb22a1533e42f1f64736f6c63430008180033",
|
|
319
|
+
"linkReferences": {},
|
|
320
|
+
"deployedLinkReferences": {}
|
|
321
|
+
}
|
|
@@ -45,6 +45,25 @@
|
|
|
45
45
|
"name": "ExpectedPause",
|
|
46
46
|
"type": "error"
|
|
47
47
|
},
|
|
48
|
+
{
|
|
49
|
+
"anonymous": false,
|
|
50
|
+
"inputs": [
|
|
51
|
+
{
|
|
52
|
+
"indexed": true,
|
|
53
|
+
"internalType": "bytes32",
|
|
54
|
+
"name": "didHash",
|
|
55
|
+
"type": "bytes32"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"indexed": false,
|
|
59
|
+
"internalType": "string",
|
|
60
|
+
"name": "endpoint",
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"name": "DiscoveryEndpointUpdated",
|
|
65
|
+
"type": "event"
|
|
66
|
+
},
|
|
48
67
|
{
|
|
49
68
|
"anonymous": false,
|
|
50
69
|
"inputs": [
|
|
@@ -210,6 +229,12 @@
|
|
|
210
229
|
"internalType": "string",
|
|
211
230
|
"name": "jurisdiction",
|
|
212
231
|
"type": "string"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"indexed": false,
|
|
235
|
+
"internalType": "string",
|
|
236
|
+
"name": "discoveryEndpoint",
|
|
237
|
+
"type": "string"
|
|
213
238
|
}
|
|
214
239
|
],
|
|
215
240
|
"name": "VASPRegistered",
|
|
@@ -267,6 +292,38 @@
|
|
|
267
292
|
"stateMutability": "view",
|
|
268
293
|
"type": "function"
|
|
269
294
|
},
|
|
295
|
+
{
|
|
296
|
+
"inputs": [],
|
|
297
|
+
"name": "getActiveVaspCount",
|
|
298
|
+
"outputs": [
|
|
299
|
+
{
|
|
300
|
+
"internalType": "uint256",
|
|
301
|
+
"name": "",
|
|
302
|
+
"type": "uint256"
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"stateMutability": "view",
|
|
306
|
+
"type": "function"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"inputs": [
|
|
310
|
+
{
|
|
311
|
+
"internalType": "bytes32",
|
|
312
|
+
"name": "didHash",
|
|
313
|
+
"type": "bytes32"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"name": "getDiscoveryEndpoint",
|
|
317
|
+
"outputs": [
|
|
318
|
+
{
|
|
319
|
+
"internalType": "string",
|
|
320
|
+
"name": "",
|
|
321
|
+
"type": "string"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"stateMutability": "view",
|
|
325
|
+
"type": "function"
|
|
326
|
+
},
|
|
270
327
|
{
|
|
271
328
|
"inputs": [
|
|
272
329
|
{
|
|
@@ -427,6 +484,11 @@
|
|
|
427
484
|
"internalType": "string",
|
|
428
485
|
"name": "jurisdiction",
|
|
429
486
|
"type": "string"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"internalType": "string",
|
|
490
|
+
"name": "discoveryEndpoint",
|
|
491
|
+
"type": "string"
|
|
430
492
|
}
|
|
431
493
|
],
|
|
432
494
|
"name": "registerVASP",
|
|
@@ -509,6 +571,24 @@
|
|
|
509
571
|
"stateMutability": "nonpayable",
|
|
510
572
|
"type": "function"
|
|
511
573
|
},
|
|
574
|
+
{
|
|
575
|
+
"inputs": [
|
|
576
|
+
{
|
|
577
|
+
"internalType": "bytes32",
|
|
578
|
+
"name": "didHash",
|
|
579
|
+
"type": "bytes32"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"internalType": "string",
|
|
583
|
+
"name": "newEndpoint",
|
|
584
|
+
"type": "string"
|
|
585
|
+
}
|
|
586
|
+
],
|
|
587
|
+
"name": "updateDiscoveryEndpoint",
|
|
588
|
+
"outputs": [],
|
|
589
|
+
"stateMutability": "nonpayable",
|
|
590
|
+
"type": "function"
|
|
591
|
+
},
|
|
512
592
|
{
|
|
513
593
|
"inputs": [
|
|
514
594
|
{
|
|
@@ -574,6 +654,11 @@
|
|
|
574
654
|
"name": "jurisdiction",
|
|
575
655
|
"type": "string"
|
|
576
656
|
},
|
|
657
|
+
{
|
|
658
|
+
"internalType": "string",
|
|
659
|
+
"name": "discoveryEndpoint",
|
|
660
|
+
"type": "string"
|
|
661
|
+
},
|
|
577
662
|
{
|
|
578
663
|
"internalType": "bool",
|
|
579
664
|
"name": "active",
|
|
@@ -589,8 +674,8 @@
|
|
|
589
674
|
"type": "function"
|
|
590
675
|
}
|
|
591
676
|
],
|
|
592
|
-
"bytecode": "0x608060405234801561001057600080fd5b5060405161119838038061119883398101604081905261002f9161015f565b6001600160a01b0381166100765760405162461bcd60e51b815260206004820152600a6024820152692d32b9379030b236b4b760b11b604482015260640160405180910390fd5b6100816000826100b3565b506100ac7fedcc084d3dcd65a1f7f23c65c46722faca6953d28e43150a467cf43e5c309238826100b3565b505061018f565b6000828152602081815260408083206001600160a01b038516845290915281205460ff16610155576000838152602081815260408083206001600160a01b03861684529091529020805460ff1916600117905561010d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610159565b5060005b92915050565b60006020828403121561017157600080fd5b81516001600160a01b038116811461018857600080fd5b9392505050565b610ffa8061019e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80637f3c5a62116100b8578063b4c6dd1d1161007c578063b4c6dd1d146102a5578063b6318d4f146102ad578063d547741f146102c0578063d9de8ff2146102d3578063f68e9553146102dc578063fe853a0b146102f157600080fd5b80637f3c5a62146102665780638456cb591461026f578063861caf2a1461027757806391d148541461028a578063a217fddf1461029d57600080fd5b806336568abe1161010a57806336568abe146101db5780633f4ba83a146101ee5780635c36901c146101f65780635c975abb1461021d578063628389b91461022857806370755bdc1461025357600080fd5b806301ffc9a714610147578063248a9ca31461016f57806327f0b707146101a05780632f2ff15d146101b5578063360c61c7146101c8575b600080fd5b61015a610155366004610c03565b610314565b60405190151581526020015b60405180910390f35b61019261017d366004610c34565b60009081526020819052604090206001015490565b604051908152602001610166565b6101b36101ae366004610c34565b61034b565b005b6101b36101c3366004610c69565b6103fb565b6101b36101d6366004610c95565b610426565b6101b36101e9366004610c69565b610624565b6101b361065c565b61015a610204366004610c34565b6000908152600260208190526040909120015460ff1690565b60015460ff1661015a565b60055461023b906001600160401b031681565b6040516001600160401b039091168152602001610166565b6101b3610261366004610c34565b610672565b61019260045481565b6101b361073c565b6101b3610285366004610c69565b61074f565b61015a610298366004610c69565b6108b1565b610192600081565b600354610192565b6101926102bb366004610c34565b6108da565b6101b36102ce366004610c69565b6108fb565b61019260065481565b610192600080516020610fa583398151915281565b6103046102ff366004610c34565b610920565b6040516101669493929190610d1b565b60006001600160e01b03198216637965db0b60e01b148061034557506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020610fa5833981519152610363816109e9565b61036b6109f3565b6004805490839055600580546001600160401b031690600061038c83610daf565b82546101009290920a6001600160401b03818102199093169183160217909155600554604080518581526020810188905291909216918101919091527fb58f08ce544339505c564baec4d389ed483a12b4539eb72b4d2377070b7e1a58915060600160405180910390a1505050565b600082815260208190526040902060010154610416816109e9565b6104208383610a19565b50505050565b600080516020610fa583398151915261043e816109e9565b6104466109f3565b6000858152600260208190526040909120015461010090046001600160401b0316156104ae5760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b60448201526064015b60405180910390fd5b6040518060800160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060016020808501829052426001600160401b03166040958601528a84526002815293909220845181546001600160a01b0319166001600160a01b039091161781559284015191830191610553915082610e75565b506040820151600290910180546060909301516001600160401b03166101000268ffffffffffffffff00199215159290921668ffffffffffffffffff19909316929092171790556003805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0186905560068054916105dc83610f34565b9190505550847fbf88c4d70cdfd809463ef38a546d78e3a250a1b04dc817b48fa5961e50e1bff885858560405161061593929190610f4d565b60405180910390a25050505050565b6001600160a01b038116331461064d5760405163334bd91960e11b815260040160405180910390fd5b6106578282610aab565b505050565b6000610667816109e9565b61066f610b16565b50565b600080516020610fa583398151915261068a816109e9565b6106926109f3565b6000828152600260208190526040909120015460ff166106e15760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064016104a5565b6000828152600260208190526040822001805460ff19169055600680549161070883610f8d565b909155505060405182907f7031a9e43cfa44363e01b7a85a6ff2d61d38d3f09edebf1fe36272dbd820014c90600090a25050565b6000610747816109e9565b61066f610b68565b600080516020610fa5833981519152610767816109e9565b61076f6109f3565b60008381526002602081905260408220015461010090046001600160401b031690036107ce5760405162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b60448201526064016104a5565b6000838152600260208190526040909120015460ff16156108225760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b60448201526064016104a5565b60008381526002602081905260408220908101805460ff1916600117905580546001600160a01b0385166001600160a01b0319909116179055600680549161086983610f34565b90915550506040516001600160a01b038316815283907fdfdb3810fd311323b8b06432f78fbceaa0f742a47cb8795ff3c08508dfc219a49060200160405180910390a2505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600381815481106108ea57600080fd5b600091825260209091200154905081565b600082815260208190526040902060010154610916816109e9565b6104208383610aab565b600260205260009081526040902080546001820180546001600160a01b03909216929161094c90610deb565b80601f016020809104026020016040519081016040528092919081815260200182805461097890610deb565b80156109c55780601f1061099a576101008083540402835291602001916109c5565b820191906000526020600020905b8154815290600101906020018083116109a857829003601f168201915b5050506002909301549192505060ff8116906001600160401b036101009091041684565b61066f8133610ba3565b60015460ff1615610a175760405163d93c066560e01b815260040160405180910390fd5b565b6000610a2583836108b1565b610aa3576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a5b3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610345565b506000610345565b6000610ab783836108b1565b15610aa3576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610345565b610b1e610be0565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610b706109f3565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610b4b565b610bad82826108b1565b610bdc5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016104a5565b5050565b60015460ff16610a1757604051638dfc202b60e01b815260040160405180910390fd5b600060208284031215610c1557600080fd5b81356001600160e01b031981168114610c2d57600080fd5b9392505050565b600060208284031215610c4657600080fd5b5035919050565b80356001600160a01b0381168114610c6457600080fd5b919050565b60008060408385031215610c7c57600080fd5b82359150610c8c60208401610c4d565b90509250929050565b60008060008060608587031215610cab57600080fd5b84359350610cbb60208601610c4d565b925060408501356001600160401b0380821115610cd757600080fd5b818701915087601f830112610ceb57600080fd5b813581811115610cfa57600080fd5b886020828501011115610d0c57600080fd5b95989497505060200194505050565b60018060a01b03851681526000602060806020840152855180608085015260005b81811015610d585787810183015185820160a001528201610d3c565b50600060a0828601015260a0601f19601f830116850101925050508315156040830152610d9060608301846001600160401b03169052565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b03808316818103610dcb57610dcb610d99565b6001019392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610dff57607f821691505b602082108103610e1f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610657576000816000526020600020601f850160051c81016020861015610e4e5750805b601f850160051c820191505b81811015610e6d57828155600101610e5a565b505050505050565b81516001600160401b03811115610e8e57610e8e610dd5565b610ea281610e9c8454610deb565b84610e25565b602080601f831160018114610ed75760008415610ebf5750858301515b600019600386901b1c1916600185901b178555610e6d565b600085815260208120601f198616915b82811015610f0657888601518255948401946001909101908401610ee7565b5085821015610f245787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201610f4657610f46610d99565b5060010190565b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f1916010192915050565b600081610f9c57610f9c610d99565b50600019019056feedcc084d3dcd65a1f7f23c65c46722faca6953d28e43150a467cf43e5c309238a2646970667358221220357bbfaeb33e98db61de67515294b1bece27bd764a9e11b631bd3c26e9faaf0d64736f6c63430008180033",
|
|
593
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80637f3c5a62116100b8578063b4c6dd1d1161007c578063b4c6dd1d146102a5578063b6318d4f146102ad578063d547741f146102c0578063d9de8ff2146102d3578063f68e9553146102dc578063fe853a0b146102f157600080fd5b80637f3c5a62146102665780638456cb591461026f578063861caf2a1461027757806391d148541461028a578063a217fddf1461029d57600080fd5b806336568abe1161010a57806336568abe146101db5780633f4ba83a146101ee5780635c36901c146101f65780635c975abb1461021d578063628389b91461022857806370755bdc1461025357600080fd5b806301ffc9a714610147578063248a9ca31461016f57806327f0b707146101a05780632f2ff15d146101b5578063360c61c7146101c8575b600080fd5b61015a610155366004610c03565b610314565b60405190151581526020015b60405180910390f35b61019261017d366004610c34565b60009081526020819052604090206001015490565b604051908152602001610166565b6101b36101ae366004610c34565b61034b565b005b6101b36101c3366004610c69565b6103fb565b6101b36101d6366004610c95565b610426565b6101b36101e9366004610c69565b610624565b6101b361065c565b61015a610204366004610c34565b6000908152600260208190526040909120015460ff1690565b60015460ff1661015a565b60055461023b906001600160401b031681565b6040516001600160401b039091168152602001610166565b6101b3610261366004610c34565b610672565b61019260045481565b6101b361073c565b6101b3610285366004610c69565b61074f565b61015a610298366004610c69565b6108b1565b610192600081565b600354610192565b6101926102bb366004610c34565b6108da565b6101b36102ce366004610c69565b6108fb565b61019260065481565b610192600080516020610fa583398151915281565b6103046102ff366004610c34565b610920565b6040516101669493929190610d1b565b60006001600160e01b03198216637965db0b60e01b148061034557506301ffc9a760e01b6001600160e01b03198316145b92915050565b600080516020610fa5833981519152610363816109e9565b61036b6109f3565b6004805490839055600580546001600160401b031690600061038c83610daf565b82546101009290920a6001600160401b03818102199093169183160217909155600554604080518581526020810188905291909216918101919091527fb58f08ce544339505c564baec4d389ed483a12b4539eb72b4d2377070b7e1a58915060600160405180910390a1505050565b600082815260208190526040902060010154610416816109e9565b6104208383610a19565b50505050565b600080516020610fa583398151915261043e816109e9565b6104466109f3565b6000858152600260208190526040909120015461010090046001600160401b0316156104ae5760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b60448201526064015b60405180910390fd5b6040518060800160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505060016020808501829052426001600160401b03166040958601528a84526002815293909220845181546001600160a01b0319166001600160a01b039091161781559284015191830191610553915082610e75565b506040820151600290910180546060909301516001600160401b03166101000268ffffffffffffffff00199215159290921668ffffffffffffffffff19909316929092171790556003805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0186905560068054916105dc83610f34565b9190505550847fbf88c4d70cdfd809463ef38a546d78e3a250a1b04dc817b48fa5961e50e1bff885858560405161061593929190610f4d565b60405180910390a25050505050565b6001600160a01b038116331461064d5760405163334bd91960e11b815260040160405180910390fd5b6106578282610aab565b505050565b6000610667816109e9565b61066f610b16565b50565b600080516020610fa583398151915261068a816109e9565b6106926109f3565b6000828152600260208190526040909120015460ff166106e15760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064016104a5565b6000828152600260208190526040822001805460ff19169055600680549161070883610f8d565b909155505060405182907f7031a9e43cfa44363e01b7a85a6ff2d61d38d3f09edebf1fe36272dbd820014c90600090a25050565b6000610747816109e9565b61066f610b68565b600080516020610fa5833981519152610767816109e9565b61076f6109f3565b60008381526002602081905260408220015461010090046001600160401b031690036107ce5760405162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b60448201526064016104a5565b6000838152600260208190526040909120015460ff16156108225760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b60448201526064016104a5565b60008381526002602081905260408220908101805460ff1916600117905580546001600160a01b0385166001600160a01b0319909116179055600680549161086983610f34565b90915550506040516001600160a01b038316815283907fdfdb3810fd311323b8b06432f78fbceaa0f742a47cb8795ff3c08508dfc219a49060200160405180910390a2505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600381815481106108ea57600080fd5b600091825260209091200154905081565b600082815260208190526040902060010154610916816109e9565b6104208383610aab565b600260205260009081526040902080546001820180546001600160a01b03909216929161094c90610deb565b80601f016020809104026020016040519081016040528092919081815260200182805461097890610deb565b80156109c55780601f1061099a576101008083540402835291602001916109c5565b820191906000526020600020905b8154815290600101906020018083116109a857829003601f168201915b5050506002909301549192505060ff8116906001600160401b036101009091041684565b61066f8133610ba3565b60015460ff1615610a175760405163d93c066560e01b815260040160405180910390fd5b565b6000610a2583836108b1565b610aa3576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610a5b3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610345565b506000610345565b6000610ab783836108b1565b15610aa3576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610345565b610b1e610be0565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610b706109f3565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610b4b565b610bad82826108b1565b610bdc5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016104a5565b5050565b60015460ff16610a1757604051638dfc202b60e01b815260040160405180910390fd5b600060208284031215610c1557600080fd5b81356001600160e01b031981168114610c2d57600080fd5b9392505050565b600060208284031215610c4657600080fd5b5035919050565b80356001600160a01b0381168114610c6457600080fd5b919050565b60008060408385031215610c7c57600080fd5b82359150610c8c60208401610c4d565b90509250929050565b60008060008060608587031215610cab57600080fd5b84359350610cbb60208601610c4d565b925060408501356001600160401b0380821115610cd757600080fd5b818701915087601f830112610ceb57600080fd5b813581811115610cfa57600080fd5b886020828501011115610d0c57600080fd5b95989497505060200194505050565b60018060a01b03851681526000602060806020840152855180608085015260005b81811015610d585787810183015185820160a001528201610d3c565b50600060a0828601015260a0601f19601f830116850101925050508315156040830152610d9060608301846001600160401b03169052565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b03808316818103610dcb57610dcb610d99565b6001019392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610dff57607f821691505b602082108103610e1f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610657576000816000526020600020601f850160051c81016020861015610e4e5750805b601f850160051c820191505b81811015610e6d57828155600101610e5a565b505050505050565b81516001600160401b03811115610e8e57610e8e610dd5565b610ea281610e9c8454610deb565b84610e25565b602080601f831160018114610ed75760008415610ebf5750858301515b600019600386901b1c1916600185901b178555610e6d565b600085815260208120601f198616915b82811015610f0657888601518255948401946001909101908401610ee7565b5085821015610f245787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201610f4657610f46610d99565b5060010190565b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f1916010192915050565b600081610f9c57610f9c610d99565b50600019019056feedcc084d3dcd65a1f7f23c65c46722faca6953d28e43150a467cf43e5c309238a2646970667358221220357bbfaeb33e98db61de67515294b1bece27bd764a9e11b631bd3c26e9faaf0d64736f6c63430008180033",
|
|
677
|
+
"bytecode": "0x60806040523480156200001157600080fd5b506040516200163b3803806200163b83398101604081905262000034916200016d565b6001600160a01b0381166200007c5760405162461bcd60e51b815260206004820152600a6024820152692d32b9379030b236b4b760b11b604482015260640160405180910390fd5b62000089600082620000be565b50620000b67fedcc084d3dcd65a1f7f23c65c46722faca6953d28e43150a467cf43e5c30923882620000be565b50506200019f565b6000828152602081815260408083206001600160a01b038516845290915281205460ff1662000163576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556200011a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000167565b5060005b92915050565b6000602082840312156200018057600080fd5b81516001600160a01b03811681146200019857600080fd5b9392505050565b61148c80620001af6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806376a7516a116100de578063b4c6dd1d11610097578063d9de8ff211610071578063d9de8ff214610336578063f68e95531461033f578063f9cda90b14610354578063fe853a0b1461035c57600080fd5b8063b4c6dd1d14610308578063b6318d4f14610310578063d547741f1461032357600080fd5b806376a7516a146102b65780637f3c5a62146102c95780638456cb59146102d2578063861caf2a146102da57806391d14854146102ed578063a217fddf1461030057600080fd5b80633f4ba83a116101305780633f4ba83a1461022c5780635c36901c146102345780635c975abb1461025a578063628389b91461026557806364ec38491461029057806370755bdc146102a357600080fd5b806301ffc9a7146101785780632430ecde146101a0578063248a9ca3146101c057806327f0b707146101f15780632f2ff15d1461020657806336568abe14610219575b600080fd5b61018b610186366004610ec2565b610380565b60405190151581526020015b60405180910390f35b6101b36101ae366004610ef3565b6103b7565b6040516101979190610f52565b6101e36101ce366004610ef3565b60009081526020819052604090206001015490565b604051908152602001610197565b6102046101ff366004610ef3565b61045f565b005b610204610214366004610f81565b61050f565b610204610227366004610f81565b61053a565b610204610572565b61018b610242366004610ef3565b60009081526002602052604090206003015460ff1690565b60015460ff1661018b565b600554610278906001600160401b031681565b6040516001600160401b039091168152602001610197565b61020461029e366004610ff5565b610588565b6102046102b1366004610ef3565b610659565b6102046102c4366004611040565b610722565b6101e360045481565b61020461096f565b6102046102e8366004610f81565b610982565b61018b6102fb366004610f81565b610ae2565b6101e3600081565b6003546101e3565b6101e361031e366004610ef3565b610b0b565b610204610331366004610f81565b610b2c565b6101e360065481565b6101e360008051602061143783398151915281565b6006546101e3565b61036f61036a366004610ef3565b610b51565b6040516101979594939291906110c9565b60006001600160e01b03198216637965db0b60e01b14806103b157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002600083815260200190815260200160002060020180546103da90611122565b80601f016020809104026020016040519081016040528092919081815260200182805461040690611122565b80156104535780601f1061042857610100808354040283529160200191610453565b820191906000526020600020905b81548152906001019060200180831161043657829003601f168201915b50505050509050919050565b60008051602061143783398151915261047781610ca8565b61047f610cb2565b6004805490839055600580546001600160401b03169060006104a083611172565b82546101009290920a6001600160401b03818102199093169183160217909155600554604080518581526020810188905291909216918101919091527fb58f08ce544339505c564baec4d389ed483a12b4539eb72b4d2377070b7e1a58915060600160405180910390a1505050565b60008281526020819052604090206001015461052a81610ca8565b6105348383610cd8565b50505050565b6001600160a01b03811633146105635760405163334bd91960e11b815260040160405180910390fd5b61056d8282610d6a565b505050565b600061057d81610ca8565b610585610dd5565b50565b6000805160206114378339815191526105a081610ca8565b6105a8610cb2565b60008481526002602052604090206003015460ff166105fb5760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064015b60405180910390fd5b6000848152600260208190526040909120016106188385836111fe565b50837fd3a8f7b6395d038a0abdb9500517f5fa8400f90dd39a038f9819137d20b911bb848460405161064b9291906112e7565b60405180910390a250505050565b60008051602061143783398151915261067181610ca8565b610679610cb2565b60008281526002602052604090206003015460ff166106c75760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064016105f2565b6000828152600260205260408120600301805460ff1916905560068054916106ee83611303565b909155505060405182907f7031a9e43cfa44363e01b7a85a6ff2d61d38d3f09edebf1fe36272dbd820014c90600090a25050565b60008051602061143783398151915261073a81610ca8565b610742610cb2565b60008781526002602052604090206003015461010090046001600160401b0316156107a45760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b60448201526064016105f2565b6040518060a00160405280876001600160a01b0316815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8701819004810282018101909252858152918101919086908690819084018382808284376000920182905250938552505060016020808501829052426001600160401b03166040958601528c84526002815293909220845181546001600160a01b0319166001600160a01b03909116178155928401519183019161088491508261131a565b5060408201516002820190610899908261131a565b506060820151600391820180546080909401516001600160401b03166101000268ffffffffffffffff00199215159290921668ffffffffffffffffff199094169390931717909155805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018890556006805491610921836113d9565b9190505550867f70d3f6ec100618e4d2ab4fbf047c4daec6b4381e3a2e8633394553447a4e9e58878787878760405161095e9594939291906113f2565b60405180910390a250505050505050565b600061097a81610ca8565b610585610e27565b60008051602061143783398151915261099a81610ca8565b6109a2610cb2565b60008381526002602052604081206003015461010090046001600160401b03169003610a015760405162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b60448201526064016105f2565b60008381526002602052604090206003015460ff1615610a545760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b60448201526064016105f2565b600083815260026020526040812060038101805460ff1916600117905580546001600160a01b0385166001600160a01b03199091161790556006805491610a9a836113d9565b90915550506040516001600160a01b038316815283907fdfdb3810fd311323b8b06432f78fbceaa0f742a47cb8795ff3c08508dfc219a49060200160405180910390a2505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60038181548110610b1b57600080fd5b600091825260209091200154905081565b600082815260208190526040902060010154610b4781610ca8565b6105348383610d6a565b600260205260009081526040902080546001820180546001600160a01b039092169291610b7d90611122565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba990611122565b8015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b505050505090806002018054610c0b90611122565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3790611122565b8015610c845780601f10610c5957610100808354040283529160200191610c84565b820191906000526020600020905b815481529060010190602001808311610c6757829003601f168201915b5050506003909301549192505060ff8116906001600160401b036101009091041685565b6105858133610e62565b60015460ff1615610cd65760405163d93c066560e01b815260040160405180910390fd5b565b6000610ce48383610ae2565b610d62576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610d1a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016103b1565b5060006103b1565b6000610d768383610ae2565b15610d62576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016103b1565b610ddd610e9f565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610e2f610cb2565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610e0a565b610e6c8282610ae2565b610e9b5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016105f2565b5050565b60015460ff16610cd657604051638dfc202b60e01b815260040160405180910390fd5b600060208284031215610ed457600080fd5b81356001600160e01b031981168114610eec57600080fd5b9392505050565b600060208284031215610f0557600080fd5b5035919050565b6000815180845260005b81811015610f3257602081850181015186830182015201610f16565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610eec6020830184610f0c565b80356001600160a01b0381168114610f7c57600080fd5b919050565b60008060408385031215610f9457600080fd5b82359150610fa460208401610f65565b90509250929050565b60008083601f840112610fbf57600080fd5b5081356001600160401b03811115610fd657600080fd5b602083019150836020828501011115610fee57600080fd5b9250929050565b60008060006040848603121561100a57600080fd5b8335925060208401356001600160401b0381111561102757600080fd5b61103386828701610fad565b9497909650939450505050565b6000806000806000806080878903121561105957600080fd5b8635955061106960208801610f65565b945060408701356001600160401b038082111561108557600080fd5b6110918a838b01610fad565b909650945060608901359150808211156110aa57600080fd5b506110b789828a01610fad565b979a9699509497509295939492505050565b6001600160a01b038616815260a0602082018190526000906110ed90830187610f0c565b82810360408401526110ff8187610f0c565b941515606084015250506001600160401b03919091166080909101529392505050565b600181811c9082168061113657607f821691505b60208210810361115657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681810361118e5761118e61115c565b6001019392505050565b634e487b7160e01b600052604160045260246000fd5b601f82111561056d576000816000526020600020601f850160051c810160208610156111d75750805b601f850160051c820191505b818110156111f6578281556001016111e3565b505050505050565b6001600160401b0383111561121557611215611198565b611229836112238354611122565b836111ae565b6000601f84116001811461125d57600085156112455750838201355b600019600387901b1c1916600186901b1783556112b7565b600083815260209020601f19861690835b8281101561128e578685013582556020948501946001909201910161126e565b50868210156112ab5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006112fb6020830184866112be565b949350505050565b6000816113125761131261115c565b506000190190565b81516001600160401b0381111561133357611333611198565b611347816113418454611122565b846111ae565b602080601f83116001811461137c57600084156113645750858301515b600019600386901b1c1916600185901b1785556111f6565b600085815260208120601f198616915b828110156113ab5788860151825594840194600190910190840161138c565b50858210156113c95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000600182016113eb576113eb61115c565b5060010190565b6001600160a01b038616815260606020820181905260009061141790830186886112be565b828103604084015261142a8185876112be565b9897505050505050505056feedcc084d3dcd65a1f7f23c65c46722faca6953d28e43150a467cf43e5c309238a26469706673582212209daa9f8b024112e1205888caca7587e87efbb841d9b96dcf0edfa29ed9fd145164736f6c63430008180033",
|
|
678
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806376a7516a116100de578063b4c6dd1d11610097578063d9de8ff211610071578063d9de8ff214610336578063f68e95531461033f578063f9cda90b14610354578063fe853a0b1461035c57600080fd5b8063b4c6dd1d14610308578063b6318d4f14610310578063d547741f1461032357600080fd5b806376a7516a146102b65780637f3c5a62146102c95780638456cb59146102d2578063861caf2a146102da57806391d14854146102ed578063a217fddf1461030057600080fd5b80633f4ba83a116101305780633f4ba83a1461022c5780635c36901c146102345780635c975abb1461025a578063628389b91461026557806364ec38491461029057806370755bdc146102a357600080fd5b806301ffc9a7146101785780632430ecde146101a0578063248a9ca3146101c057806327f0b707146101f15780632f2ff15d1461020657806336568abe14610219575b600080fd5b61018b610186366004610ec2565b610380565b60405190151581526020015b60405180910390f35b6101b36101ae366004610ef3565b6103b7565b6040516101979190610f52565b6101e36101ce366004610ef3565b60009081526020819052604090206001015490565b604051908152602001610197565b6102046101ff366004610ef3565b61045f565b005b610204610214366004610f81565b61050f565b610204610227366004610f81565b61053a565b610204610572565b61018b610242366004610ef3565b60009081526002602052604090206003015460ff1690565b60015460ff1661018b565b600554610278906001600160401b031681565b6040516001600160401b039091168152602001610197565b61020461029e366004610ff5565b610588565b6102046102b1366004610ef3565b610659565b6102046102c4366004611040565b610722565b6101e360045481565b61020461096f565b6102046102e8366004610f81565b610982565b61018b6102fb366004610f81565b610ae2565b6101e3600081565b6003546101e3565b6101e361031e366004610ef3565b610b0b565b610204610331366004610f81565b610b2c565b6101e360065481565b6101e360008051602061143783398151915281565b6006546101e3565b61036f61036a366004610ef3565b610b51565b6040516101979594939291906110c9565b60006001600160e01b03198216637965db0b60e01b14806103b157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002600083815260200190815260200160002060020180546103da90611122565b80601f016020809104026020016040519081016040528092919081815260200182805461040690611122565b80156104535780601f1061042857610100808354040283529160200191610453565b820191906000526020600020905b81548152906001019060200180831161043657829003601f168201915b50505050509050919050565b60008051602061143783398151915261047781610ca8565b61047f610cb2565b6004805490839055600580546001600160401b03169060006104a083611172565b82546101009290920a6001600160401b03818102199093169183160217909155600554604080518581526020810188905291909216918101919091527fb58f08ce544339505c564baec4d389ed483a12b4539eb72b4d2377070b7e1a58915060600160405180910390a1505050565b60008281526020819052604090206001015461052a81610ca8565b6105348383610cd8565b50505050565b6001600160a01b03811633146105635760405163334bd91960e11b815260040160405180910390fd5b61056d8282610d6a565b505050565b600061057d81610ca8565b610585610dd5565b50565b6000805160206114378339815191526105a081610ca8565b6105a8610cb2565b60008481526002602052604090206003015460ff166105fb5760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064015b60405180910390fd5b6000848152600260208190526040909120016106188385836111fe565b50837fd3a8f7b6395d038a0abdb9500517f5fa8400f90dd39a038f9819137d20b911bb848460405161064b9291906112e7565b60405180910390a250505050565b60008051602061143783398151915261067181610ca8565b610679610cb2565b60008281526002602052604090206003015460ff166106c75760405162461bcd60e51b815260206004820152600a6024820152694e6f742061637469766560b01b60448201526064016105f2565b6000828152600260205260408120600301805460ff1916905560068054916106ee83611303565b909155505060405182907f7031a9e43cfa44363e01b7a85a6ff2d61d38d3f09edebf1fe36272dbd820014c90600090a25050565b60008051602061143783398151915261073a81610ca8565b610742610cb2565b60008781526002602052604090206003015461010090046001600160401b0316156107a45760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b60448201526064016105f2565b6040518060a00160405280876001600160a01b0316815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8701819004810282018101909252858152918101919086908690819084018382808284376000920182905250938552505060016020808501829052426001600160401b03166040958601528c84526002815293909220845181546001600160a01b0319166001600160a01b03909116178155928401519183019161088491508261131a565b5060408201516002820190610899908261131a565b506060820151600391820180546080909401516001600160401b03166101000268ffffffffffffffff00199215159290921668ffffffffffffffffff199094169390931717909155805460018101825560009182527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018890556006805491610921836113d9565b9190505550867f70d3f6ec100618e4d2ab4fbf047c4daec6b4381e3a2e8633394553447a4e9e58878787878760405161095e9594939291906113f2565b60405180910390a250505050505050565b600061097a81610ca8565b610585610e27565b60008051602061143783398151915261099a81610ca8565b6109a2610cb2565b60008381526002602052604081206003015461010090046001600160401b03169003610a015760405162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b60448201526064016105f2565b60008381526002602052604090206003015460ff1615610a545760405162461bcd60e51b815260206004820152600e60248201526d416c72656164792061637469766560901b60448201526064016105f2565b600083815260026020526040812060038101805460ff1916600117905580546001600160a01b0385166001600160a01b03199091161790556006805491610a9a836113d9565b90915550506040516001600160a01b038316815283907fdfdb3810fd311323b8b06432f78fbceaa0f742a47cb8795ff3c08508dfc219a49060200160405180910390a2505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60038181548110610b1b57600080fd5b600091825260209091200154905081565b600082815260208190526040902060010154610b4781610ca8565b6105348383610d6a565b600260205260009081526040902080546001820180546001600160a01b039092169291610b7d90611122565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba990611122565b8015610bf65780601f10610bcb57610100808354040283529160200191610bf6565b820191906000526020600020905b815481529060010190602001808311610bd957829003601f168201915b505050505090806002018054610c0b90611122565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3790611122565b8015610c845780601f10610c5957610100808354040283529160200191610c84565b820191906000526020600020905b815481529060010190602001808311610c6757829003601f168201915b5050506003909301549192505060ff8116906001600160401b036101009091041685565b6105858133610e62565b60015460ff1615610cd65760405163d93c066560e01b815260040160405180910390fd5b565b6000610ce48383610ae2565b610d62576000838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610d1a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016103b1565b5060006103b1565b6000610d768383610ae2565b15610d62576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016103b1565b610ddd610e9f565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610e2f610cb2565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610e0a565b610e6c8282610ae2565b610e9b5760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016105f2565b5050565b60015460ff16610cd657604051638dfc202b60e01b815260040160405180910390fd5b600060208284031215610ed457600080fd5b81356001600160e01b031981168114610eec57600080fd5b9392505050565b600060208284031215610f0557600080fd5b5035919050565b6000815180845260005b81811015610f3257602081850181015186830182015201610f16565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610eec6020830184610f0c565b80356001600160a01b0381168114610f7c57600080fd5b919050565b60008060408385031215610f9457600080fd5b82359150610fa460208401610f65565b90509250929050565b60008083601f840112610fbf57600080fd5b5081356001600160401b03811115610fd657600080fd5b602083019150836020828501011115610fee57600080fd5b9250929050565b60008060006040848603121561100a57600080fd5b8335925060208401356001600160401b0381111561102757600080fd5b61103386828701610fad565b9497909650939450505050565b6000806000806000806080878903121561105957600080fd5b8635955061106960208801610f65565b945060408701356001600160401b038082111561108557600080fd5b6110918a838b01610fad565b909650945060608901359150808211156110aa57600080fd5b506110b789828a01610fad565b979a9699509497509295939492505050565b6001600160a01b038616815260a0602082018190526000906110ed90830187610f0c565b82810360408401526110ff8187610f0c565b941515606084015250506001600160401b03919091166080909101529392505050565b600181811c9082168061113657607f821691505b60208210810361115657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160401b0380831681810361118e5761118e61115c565b6001019392505050565b634e487b7160e01b600052604160045260246000fd5b601f82111561056d576000816000526020600020601f850160051c810160208610156111d75750805b601f850160051c820191505b818110156111f6578281556001016111e3565b505050505050565b6001600160401b0383111561121557611215611198565b611229836112238354611122565b836111ae565b6000601f84116001811461125d57600085156112455750838201355b600019600387901b1c1916600186901b1783556112b7565b600083815260209020601f19861690835b8281101561128e578685013582556020948501946001909201910161126e565b50868210156112ab5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006112fb6020830184866112be565b949350505050565b6000816113125761131261115c565b506000190190565b81516001600160401b0381111561133357611333611198565b611347816113418454611122565b846111ae565b602080601f83116001811461137c57600084156113645750858301515b600019600386901b1c1916600185901b1785556111f6565b600085815260208120601f198616915b828110156113ab5788860151825594840194600190910190840161138c565b50858210156113c95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000600182016113eb576113eb61115c565b5060010190565b6001600160a01b038616815260606020820181905260009061141790830186886112be565b828103604084015261142a8185876112be565b9897505050505050505056feedcc084d3dcd65a1f7f23c65c46722faca6953d28e43150a467cf43e5c309238a26469706673582212209daa9f8b024112e1205888caca7587e87efbb841d9b96dcf0edfa29ed9fd145164736f6c63430008180033",
|
|
594
679
|
"linkReferences": {},
|
|
595
680
|
"deployedLinkReferences": {}
|
|
596
681
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// clearproof — ZK-proven compliance without transmitting PII
|
|
3
|
+
// https://clearproof.world | https://docs.clearproof.world
|
|
2
4
|
pragma solidity ^0.8.24;
|
|
3
5
|
|
|
4
6
|
import "@openzeppelin/contracts/access/AccessControl.sol";
|
|
@@ -6,14 +8,14 @@ import "@openzeppelin/contracts/utils/Pausable.sol";
|
|
|
6
8
|
import "./VASPRegistry.sol";
|
|
7
9
|
import "./SanctionsOracle.sol";
|
|
8
10
|
|
|
9
|
-
/// @dev Interface for the Groth16 verifier with
|
|
11
|
+
/// @dev Interface for the Groth16 verifier with 16 public signals.
|
|
10
12
|
/// The concrete Groth16Verifier.sol will be regenerated after circuit recompilation.
|
|
11
13
|
interface IGroth16Verifier {
|
|
12
14
|
function verifyProof(
|
|
13
15
|
uint[2] calldata _pA,
|
|
14
16
|
uint[2][2] calldata _pB,
|
|
15
17
|
uint[2] calldata _pC,
|
|
16
|
-
uint[
|
|
18
|
+
uint[16] calldata _pubSignals
|
|
17
19
|
) external view returns (bool);
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -56,7 +58,7 @@ contract ComplianceRegistry is AccessControl, Pausable {
|
|
|
56
58
|
uint[2] calldata _pA,
|
|
57
59
|
uint[2][2] calldata _pB,
|
|
58
60
|
uint[2] calldata _pC,
|
|
59
|
-
uint[
|
|
61
|
+
uint[16] calldata _pubSignals,
|
|
60
62
|
bytes32 vaspDidHash
|
|
61
63
|
) external whenNotPaused returns (bool) {
|
|
62
64
|
// Replay prevention
|
|
@@ -69,19 +71,29 @@ contract ComplianceRegistry is AccessControl, Pausable {
|
|
|
69
71
|
require(vaspRegistry.isActive(vaspDidHash), "VASP not active");
|
|
70
72
|
|
|
71
73
|
// Sender binding
|
|
72
|
-
(address vaspWallet
|
|
74
|
+
(address vaspWallet,,,, ) = vaspRegistry.vasps(vaspDidHash);
|
|
73
75
|
require(msg.sender == vaspWallet, "Not registered VASP wallet");
|
|
74
76
|
|
|
75
77
|
// C-3: Domain binding (cross-chain replay protection)
|
|
76
78
|
require(_pubSignals[11] == block.chainid, "Wrong chain");
|
|
77
|
-
|
|
79
|
+
// Circuit signals are reduced mod BN128 scalar field order (r).
|
|
80
|
+
// keccak256 produces 256-bit values that may exceed r, so we must
|
|
81
|
+
// reduce the contract-side hash to match what the circuit stores.
|
|
82
|
+
uint256 BN128_R = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
|
|
83
|
+
require(uint256(keccak256(abi.encodePacked(address(this)))) % BN128_R == _pubSignals[12], "Wrong contract");
|
|
84
|
+
|
|
85
|
+
// Proof expiration: proof_expires_at (signal[15]) is a circuit public signal.
|
|
86
|
+
// The circuit constrains proof_expires_at > transfer_timestamp.
|
|
87
|
+
// Here we check the proof hasn't expired yet.
|
|
88
|
+
require(block.timestamp <= _pubSignals[15], "Proof expired");
|
|
89
|
+
require(_pubSignals[5] <= block.timestamp, "Proof timestamp in future");
|
|
78
90
|
|
|
79
91
|
// C-4: State binding (proof matches current on-chain roots)
|
|
80
92
|
require(bytes32(_pubSignals[2]) == sanctionsOracle.currentRoot(), "Sanctions root mismatch");
|
|
81
93
|
require(bytes32(_pubSignals[3]) == vaspRegistry.issuerMerkleRoot(), "Issuer root mismatch");
|
|
82
94
|
|
|
83
95
|
// M-1: Transfer binding (proof bound to this transfer)
|
|
84
|
-
require(uint256(keccak256(abi.encodePacked(transferId))) == _pubSignals[13], "Transfer ID mismatch");
|
|
96
|
+
require(uint256(keccak256(abi.encodePacked(transferId))) % BN128_R == _pubSignals[13], "Transfer ID mismatch");
|
|
85
97
|
|
|
86
98
|
// C-5: Credential revocation check
|
|
87
99
|
require(!revokedCredentials[bytes32(_pubSignals[7])], "Credential revoked");
|
|
@@ -102,7 +114,10 @@ contract ComplianceRegistry is AccessControl, Pausable {
|
|
|
102
114
|
verified: true // Always true now (we revert on invalid)
|
|
103
115
|
});
|
|
104
116
|
|
|
105
|
-
|
|
117
|
+
// Hash the nullifier before emitting to prevent blockchain observers
|
|
118
|
+
// from correlating transfer patterns across ProofVerified events.
|
|
119
|
+
bytes32 blindedNullifier = keccak256(abi.encodePacked(nullifier));
|
|
120
|
+
emit ProofVerified(transferId, blindedNullifier, _pubSignals[0] == 1, _pubSignals[1] == 1);
|
|
106
121
|
return true;
|
|
107
122
|
}
|
|
108
123
|
|