-
Notifications
You must be signed in to change notification settings - Fork 0
/
ExplicitUserConsent.json
270 lines (270 loc) · 46.8 KB
/
ExplicitUserConsent.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
{
"address": "0xDc9B1F462066426a17252221e25159fD43d74986",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "dataOfferingId",
"type": "string"
},
{
"indexed": false,
"internalType": "string[]",
"name": "consentSubjects",
"type": "string[]"
}
],
"name": "ConsentGiven",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string[]",
"name": "consumers",
"type": "string[]"
},
{
"indexed": false,
"internalType": "string",
"name": "dataOfferingId",
"type": "string"
},
{
"indexed": false,
"internalType": "string[]",
"name": "consentSubjects",
"type": "string[]"
}
],
"name": "ConsentRevoked",
"type": "event"
},
{
"inputs": [
{
"internalType": "string",
"name": "_dataOfferingId",
"type": "string"
},
{
"internalType": "string",
"name": "_consentSubject",
"type": "string"
}
],
"name": "checkConsentStatus",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_dataOfferingId",
"type": "string"
},
{
"internalType": "string[]",
"name": "_consentSubjects",
"type": "string[]"
},
{
"internalType": "string",
"name": "_consentFormHash",
"type": "string"
},
{
"internalType": "uint256",
"name": "_startDate",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_endDate",
"type": "uint256"
}
],
"name": "giveConsent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_addr",
"type": "address"
},
{
"internalType": "string",
"name": "_dataOfferingId",
"type": "string"
},
{
"internalType": "string[]",
"name": "_consentSubjects",
"type": "string[]"
}
],
"name": "revokeConsent",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x3e680cd11910e6457dd45bf7114e0209bbe859eb28a011b43e2f5ddf1582e3c8",
"receipt": {
"to": null,
"from": "0x580d142D0c2958d843499553275e427Da4Ab7Eb5",
"contractAddress": "0xDc9B1F462066426a17252221e25159fD43d74986",
"transactionIndex": 0,
"gasUsed": "1123655",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xa04cc8bf4a5954771dda8460f02a73666015394552f0e61def3d692a10cd538b",
"transactionHash": "0x3e680cd11910e6457dd45bf7114e0209bbe859eb28a011b43e2f5ddf1582e3c8",
"logs": [],
"blockNumber": 801221,
"cumulativeGasUsed": "1123655",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "35c5884c2adbf2630669334f8983c84f",
"metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dataOfferingId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"consentSubjects\",\"type\":\"string[]\"}],\"name\":\"ConsentGiven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"consumers\",\"type\":\"string[]\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"dataOfferingId\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string[]\",\"name\":\"consentSubjects\",\"type\":\"string[]\"}],\"name\":\"ConsentRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_dataOfferingId\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_consentSubject\",\"type\":\"string\"}],\"name\":\"checkConsentStatus\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_dataOfferingId\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_consentSubjects\",\"type\":\"string[]\"},{\"internalType\":\"string\",\"name\":\"_consentFormHash\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_startDate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endDate\",\"type\":\"uint256\"}],\"name\":\"giveConsent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_dataOfferingId\",\"type\":\"string\"},{\"internalType\":\"string[]\",\"name\":\"_consentSubjects\",\"type\":\"string[]\"}],\"name\":\"revokeConsent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/ExplicitUserConsent.sol\":\"ExplicitUserConsent\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":500},\"remappings\":[]},\"sources\":{\"contracts/Agreement.sol\":{\"content\":\"// /*\\r\\n\\r\\n// * Copyright (c) Siemens AG, 2020-2022\\r\\n\\r\\n// *\\r\\n\\r\\n// * Authors:\\r\\n\\r\\n// * Susanne Stahnke <susanne.stahnke@siemens.com>,\\r\\n\\r\\n// * Yvonne Kovacs <yvonne.kovacs@siemens.com>\\r\\n\\r\\n// *\\r\\n\\r\\n// * This work is licensed under the terms of Apache 2.0. See\\r\\n\\r\\n// * the LICENSE file in the top-level directory.\\r\\n\\r\\n// */\\r\\n\\r\\npragma solidity ^0.8.0;\\r\\n\\r\\nenum State {\\r\\n Active,\\r\\n Violated,\\r\\n Terminated\\r\\n}\\r\\n\\r\\nstruct Agreement {\\r\\n uint256 agreementId;\\r\\n string providerPublicKey;\\r\\n string consumerPublicKey;\\r\\n string dataExchangeAgreementHash;\\r\\n string[2] signatures;\\r\\n DataOffering dataOffering;\\r\\n string purpose;\\r\\n State state;\\r\\n uint256[3] agreementDates;\\r\\n IntendedUse intendedUse;\\r\\n LicenseGrant licenseGrant;\\r\\n TypeOfData typeOfData;\\r\\n PricingModel pricingModel;\\r\\n Violation violation;\\r\\n}\\r\\n\\r\\nstruct TypeOfData {\\r\\n bool dataStream;\\r\\n bool personalData;\\r\\n}\\r\\n\\r\\nstruct DataOffering {\\r\\n string dataOfferingId;\\r\\n uint256 dataOfferingVersion;\\r\\n string title;\\r\\n}\\r\\n\\r\\nstruct IntendedUse {\\r\\n bool processData;\\r\\n bool shareDataWithThirdParty;\\r\\n bool editData;\\r\\n}\\r\\n\\r\\nstruct LicenseGrant {\\r\\n bool transferable;\\r\\n bool exclusiveness;\\r\\n bool paidUp;\\r\\n bool revocable;\\r\\n bool processing;\\r\\n bool modifying;\\r\\n bool analyzing;\\r\\n bool storingData;\\r\\n bool storingCopy;\\r\\n bool reproducing;\\r\\n bool distributing;\\r\\n bool loaning;\\r\\n bool selling;\\r\\n bool renting;\\r\\n bool furtherLicensing;\\r\\n bool leasing;\\r\\n}\\r\\n\\r\\nstruct PricingModel {\\r\\n string paymentType;\\r\\n uint256 price;\\r\\n string currency;\\r\\n uint256 fee;\\r\\n PaymentOnSubscription paymentOnSubscription;\\r\\n bool isFree;\\r\\n}\\r\\n\\r\\nstruct PaymentOnSubscription {\\r\\n string timeDuration;\\r\\n string repeat;\\r\\n}\\r\\n\\r\\nenum ViolationType {\\r\\n NotViolated,\\r\\n PaymentNotCompleted,\\r\\n DataNotTransferredAsDescribed,\\r\\n DataNotAsDescribed,\\r\\n LicenseViolated\\r\\n}\\r\\n\\r\\nstruct Violation {\\r\\n ViolationType violationType;\\r\\n string issuerId;\\r\\n string[3] penaltyChoices;\\r\\n}\\r\\n\\r\\n\\r\\nstruct SignedResolution {\\r\\n string proofType;\\r\\n string resolutionType;\\r\\n string resolution;\\r\\n string dataExchangeId;\\r\\n uint256 iat;\\r\\n string iss;\\r\\n string sub;\\r\\n}\\r\\n\\r\\nlibrary AgreementViolationLibrary {\\r\\n\\r\\n function evaluateResolution(\\r\\n Agreement storage agreement,\\r\\n string memory _proofType,\\r\\n string memory _type,\\r\\n string memory _resolution,\\r\\n string memory _dataExchangeId,\\r\\n uint256 _iat,\\r\\n string memory _iss,\\r\\n string memory _sub) public{ \\r\\n\\r\\n SignedResolution memory signedResolution = SignedResolution( _proofType, _type, _resolution, _dataExchangeId, _iat, _iss, _sub);\\r\\n\\r\\n if(keccak256(abi.encodePacked(signedResolution.resolution)) == keccak256(abi.encodePacked(\\\"completed\\\"))){\\r\\n delete agreement.violation;\\r\\n agreement.state = State.Active; \\r\\n }\\r\\n else if(keccak256(abi.encodePacked(signedResolution.resolution)) == keccak256(abi.encodePacked(\\\"notCompleted\\\"))) { \\r\\n issueViolation(agreement, ViolationType.DataNotTransferredAsDescribed, signedResolution.sub); \\r\\n agreement.state = State.Violated; \\r\\n }\\r\\n else if(keccak256(abi.encodePacked(signedResolution.resolution)) == keccak256(abi.encodePacked(\\\"accepted\\\"))){ \\r\\n issueViolation(agreement, ViolationType.DataNotTransferredAsDescribed, signedResolution.sub); \\r\\n agreement.state = State.Violated; \\r\\n }\\r\\n else if(keccak256(abi.encodePacked(signedResolution.resolution)) == keccak256(abi.encodePacked(\\\"denied\\\"))){\\r\\n delete agreement.violation; \\r\\n agreement.state = State.Active; \\r\\n }\\r\\n }\\r\\n\\r\\n function issueViolation(Agreement storage agreement, ViolationType _violationType, string memory _issuerId) private {\\r\\n agreement.violation = Violation(_violationType, _issuerId, [\\\"Terminate\\\", \\\"NewEndDateForAgreement\\\", \\\"NewEndDateForAgreementAndReductionOfPayment\\\"]);\\r\\n }\\r\\n\\r\\n function getViolation(Agreement storage agreement) public view returns (Violation memory){\\r\\n return agreement.violation;\\r\\n }\\r\\n \\r\\n function enforcePenalty (Agreement storage agreement, string memory _chosenPenalty, uint256 _price, uint256 _fee,\\r\\n uint256 _newEndDate) public returns (Agreement storage) {\\r\\n\\r\\n if(agreement.violation.violationType == ViolationType.DataNotTransferredAsDescribed){\\r\\n if (keccak256(abi.encodePacked(_chosenPenalty)) == \\\"NewEndDateForAgreement\\\"){\\r\\n require(_newEndDate > block.timestamp, \\\"New end date must be after current date\\\");\\r\\n agreement.agreementDates[2] = _newEndDate;\\r\\n }\\r\\n else if (keccak256(abi.encodePacked(_chosenPenalty)) == (keccak256(abi.encodePacked(\\\"NewEndDateForAgreementAndReductionOfPayment\\\")))){\\r\\n require(_newEndDate > block.timestamp, \\\"New end date must be after current date.\\\");\\r\\n agreement.agreementDates[2] = _newEndDate;\\r\\n agreement.pricingModel.price = _price;\\r\\n agreement.pricingModel.fee = _fee;\\r\\n }\\r\\n agreement.state = State.Active;\\r\\n } \\r\\n return agreement; \\r\\n }\\r\\n}\\r\\n \\r\\n\\r\\ncontract DataSharingAgreement {\\r\\n \\r\\n using AgreementViolationLibrary for Agreement;\\r\\n \\r\\n uint256 agreementId;\\r\\n\\r\\n mapping (string => bool) isPublicKeyProvider;\\r\\n mapping (string => bool) isPublicKeyConsumer;\\r\\n\\r\\n mapping (uint256 => Agreement) agreements;\\r\\n mapping (string => uint256) consumerKey2agreementId;\\r\\n mapping (string => uint256) providerKey2agreementId;\\r\\n mapping (string => uint256[]) offeringId2agreementIds;\\r\\n\\r\\n event AgreementActive(string providerPublicKey, string consumerPublicKey, uint256 id);\\r\\n event PenaltyChoices(string consumerPublicKey, uint256 id, string[3] penaltyChoices);\\r\\n event AgreeOnPenalty(string providerPublicKey, string consumerPublicKey, uint256 id, string chosenPenalty, uint256 newEndDate, uint256 price, uint256 fee);\\r\\n event AgreementTerminated(string providerPublicKey, string consumerPublicKey,uint256 id);\\r\\n\\r\\n function createAgreement(\\r\\n string memory _providerPublicKey,\\r\\n string memory _consumerPublicKey,\\r\\n string memory _dataExchangeAgreementHash,\\r\\n string[2] memory _signatures,\\r\\n DataOffering memory dataOffering,\\r\\n string memory _purpose,\\r\\n uint256[3] memory dates,\\r\\n IntendedUse memory intendedUse,\\r\\n LicenseGrant memory licenseGrant,\\r\\n PricingModel memory pricingModel,\\r\\n TypeOfData memory typeOfData\\r\\n ) public {\\r\\n require (isPublicKeyProvider[_providerPublicKey] == false, \\\"Provider pK should be unique.\\\");\\r\\n require (isPublicKeyConsumer[_consumerPublicKey] == false, \\\"Consumer pK should be unique.\\\");\\r\\n require(dates[1] >= dates[0], \\\"Start date must be after creation date.\\\");\\r\\n require(dates[2] > dates[1], \\\"End date must be after start date.\\\");\\r\\n\\r\\n agreementId++; \\r\\n agreements[agreementId] = Agreement(\\r\\n agreementId,\\r\\n _providerPublicKey,\\r\\n _consumerPublicKey,\\r\\n _dataExchangeAgreementHash,\\r\\n _signatures,\\r\\n dataOffering,\\r\\n _purpose,\\r\\n State.Active,\\r\\n dates,\\r\\n intendedUse,\\r\\n licenseGrant,\\r\\n typeOfData,\\r\\n pricingModel,\\r\\n Violation(ViolationType.NotViolated,\\\"\\\",[\\\"\\\",\\\"\\\",\\\"\\\"]) \\r\\n );\\r\\n \\r\\n consumerKey2agreementId[_consumerPublicKey] = agreementId;\\r\\n providerKey2agreementId[_providerPublicKey] = agreementId;\\r\\n offeringId2agreementIds[dataOffering.dataOfferingId].push(agreementId);\\r\\n \\r\\n isPublicKeyProvider[_providerPublicKey] = true;\\r\\n isPublicKeyConsumer[_consumerPublicKey] = true;\\r\\n\\r\\n emit AgreementActive(_providerPublicKey, _consumerPublicKey, agreementId);\\r\\n }\\r\\n\\r\\n function getAgreement(uint256 id) public view returns (Agreement memory) {\\r\\n return agreements[id];\\r\\n }\\r\\n\\r\\n function retrievePricingModel(uint256 _agreementId) public view returns (PricingModel memory){\\r\\n return agreements[_agreementId].pricingModel;\\r\\n }\\r\\n\\r\\n function getState(uint256 id) public view returns (State) {\\r\\n return agreements[id].state;\\r\\n } \\r\\n\\r\\n function getAgreementsByConsumer(string memory _consumerPublicKey, bool active) external view returns (Agreement memory consumerAgreement) {\\r\\n Agreement memory agreement = agreements[consumerKey2agreementId[_consumerPublicKey]];\\r\\n if(active){\\r\\n if(agreement.state == State.Active)\\r\\n return agreement; \\r\\n } \\r\\n else\\r\\n return agreement;\\r\\n }\\r\\n\\r\\n function getAgreementsByProvider(string memory _providerPublicKeys, bool active) public view returns(Agreement memory providerAgreement) {\\r\\n Agreement memory agreement = agreements[providerKey2agreementId[_providerPublicKeys]];\\r\\n if(active){\\r\\n if (agreement.state == State.Active)\\r\\n return agreement;\\r\\n }\\r\\n else \\r\\n return agreement;\\r\\n }\\r\\n\\r\\n function checkAgreementsByDataOffering(string memory _dataOfferingId) public view returns(uint256[] memory) {\\r\\n return offeringId2agreementIds[_dataOfferingId];\\r\\n }\\r\\n\\r\\n function evaluateSignedResolution(uint256 _agreementId, string memory _proofType, string memory _type, string memory _resolution,\\r\\n string memory _dataExchangeId, uint256 _iat, string memory _iss, string memory _sub) public{ \\r\\n\\r\\n AgreementViolationLibrary.evaluateResolution(agreements[_agreementId], _proofType, _type, _resolution, _dataExchangeId, _iat, _iss, _sub);\\r\\n emit PenaltyChoices(agreements[_agreementId].consumerPublicKey, _agreementId, agreements[_agreementId].violation.penaltyChoices);\\r\\n }\\r\\n\\r\\n function terminateAgreement(uint256 _agreementId, bool terminate) public{ \\r\\n if(agreements[_agreementId].agreementDates[2]<=block.timestamp || terminate){ \\r\\n agreements[_agreementId].state = State.Terminated;\\r\\n emit AgreementTerminated(agreements[_agreementId].providerPublicKey, agreements[_agreementId].consumerPublicKey, _agreementId); \\r\\n }\\r\\n }\\r\\n\\r\\n function enforcePenalty ( uint256 _id, string memory _chosenPenalty, uint256 _price, uint256 _fee, uint256 _newEndDate) public {\\r\\n require((agreements[_id].state == State.Violated), \\\"Agreement must be violated in order to enforce penalty\\\");\\r\\n if(keccak256(abi.encodePacked(_chosenPenalty)) == keccak256(abi.encodePacked(\\\"Terminate\\\"))){\\r\\n terminateAgreement(_id, true);\\r\\n }\\r\\n else{\\r\\n AgreementViolationLibrary.enforcePenalty (agreements[_id], _chosenPenalty, _price, _fee, _newEndDate);\\r\\n emit AgreeOnPenalty(agreements[_id].providerPublicKey, agreements[_id].consumerPublicKey,\\r\\n agreements[_id].agreementId, _chosenPenalty, _newEndDate,_price, _fee);\\r\\n }\\r\\n }\\r\\n\\r\\n function notifyConsentRevoked( string memory _dataOfferingId) public view returns (string[] memory) { \\r\\n\\r\\n uint256[] memory agreementIds = offeringId2agreementIds[_dataOfferingId];\\r\\n \\r\\n string[] memory consumers = new string[](agreementIds.length);\\r\\n for (uint i = 0; i < agreementIds.length; i++){\\r\\n consumers[i] = agreements[agreementIds[i]].consumerPublicKey;\\r\\n }\\r\\n return consumers;\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x70afc08ec13acff6e97adee63fb2a2740d7fe21a307caef5921f1099e4ecff46\"},\"contracts/ExplicitUserConsent.sol\":{\"content\":\"// /*\\r\\n\\r\\n// * Copyright (c) Siemens AG, 2020-2022\\r\\n\\r\\n// *\\r\\n\\r\\n// * Authors:\\r\\n\\r\\n// * Susanne Stahnke <susanne.stahnke@siemens.com>,\\r\\n\\r\\n// * Yvonne Kovacs <yvonne.kovacs@siemens.com>\\r\\n\\r\\n// *\\r\\n\\r\\n// * This work is licensed under the terms of Apache 2.0. See\\r\\n\\r\\n// * the LICENSE file in the top-level directory.\\r\\n\\r\\n// */\\r\\n\\r\\nimport \\\"./Agreement.sol\\\";\\r\\n\\r\\ncontract ExplicitUserConsent {\\r\\n\\r\\n struct Consent {\\r\\n string dataOfferingId;\\r\\n string consentSubject;\\r\\n address consentOperator;\\r\\n string consentFormHash;\\r\\n uint256 startDate;\\r\\n uint256 endDate;\\r\\n uint256 status;\\r\\n }\\r\\n\\r\\n mapping(string => Consent[]) consents;\\r\\n\\r\\n event ConsentGiven(string dataOfferingId, string[] consentSubjects);\\r\\n event ConsentRevoked(string[] consumers, string dataOfferingId, string[] consentSubjects);\\r\\n\\r\\n function giveConsent(\\r\\n string memory _dataOfferingId,\\r\\n string[] memory _consentSubjects,\\r\\n string memory _consentFormHash,\\r\\n uint256 _startDate,\\r\\n uint256 _endDate\\r\\n ) public {\\r\\n require(_startDate>=block.timestamp);\\r\\n require(_endDate>=_startDate);\\r\\n for(uint256 i=0; i< _consentSubjects.length; i++) {\\r\\n \\r\\n consents[_dataOfferingId].push(Consent(_dataOfferingId,_consentSubjects[i], msg.sender, _consentFormHash,_startDate,_endDate, _endDate));\\r\\n }\\r\\n emit ConsentGiven(_dataOfferingId, _consentSubjects);\\r\\n }\\r\\n\\r\\n\\r\\n function checkConsentStatus(string memory _dataOfferingId, string memory _consentSubject)\\r\\n external\\r\\n view\\r\\n returns (uint256[] memory) \\r\\n {\\r\\n Consent[] memory consentsByDataOffering = consents[_dataOfferingId];\\r\\n uint256 length = consentsByDataOffering.length;\\r\\n uint256[] memory consentsStatus;\\r\\n uint256 k = 0;\\r\\n\\r\\n bytes memory emptyString = bytes(_consentSubject); \\r\\n if (emptyString.length == 0) {\\r\\n consentsStatus = new uint256[](length);\\r\\n for (uint256 i = 0; i < length; i++) { \\r\\n if (block.timestamp > consentsByDataOffering[i].endDate){ \\r\\n consentsByDataOffering[i].status = 0; \\r\\n }\\r\\n consentsStatus[k++] = consentsByDataOffering[i].status;\\r\\n }\\r\\n }\\r\\n else {\\r\\n consentsStatus = new uint256[](1);\\r\\n for (uint256 i = length-1; i >= 0; i--) {\\r\\n if (block.timestamp > consentsByDataOffering[i].endDate){\\r\\n consentsByDataOffering[i].status = 0; \\r\\n }\\r\\n if(keccak256(abi.encodePacked(consentsByDataOffering[i].consentSubject)) == keccak256(abi.encodePacked(_consentSubject))){\\r\\n consentsStatus[k++] = consentsByDataOffering[i].status;\\r\\n break;\\r\\n }\\r\\n } \\r\\n }\\r\\n \\r\\n return consentsStatus;\\r\\n }\\r\\n\\r\\n function revokeConsent( address _addr, string memory _dataOfferingId, string[] memory _consentSubjects) public {\\r\\n\\r\\n Consent[] memory consentsByDataOffering = consents[_dataOfferingId];\\r\\n uint256 length = consentsByDataOffering.length;\\r\\n if (_consentSubjects.length == 0) {\\r\\n for (uint256 i = 0; i < length; i++) {\\r\\n require(consents[_dataOfferingId][i].consentOperator == msg.sender);\\r\\n consents[_dataOfferingId][i].status = 0;\\r\\n }\\r\\n } else {\\r\\n for (uint256 i = 0; i < length; i++) {\\r\\n require(consents[_dataOfferingId][i].consentOperator == msg.sender);\\r\\n for (uint256 j = 0; j < _consentSubjects.length; j++)\\r\\n if (keccak256(abi.encodePacked(consentsByDataOffering[i].consentSubject)) == keccak256(abi.encodePacked(_consentSubjects[j])))\\r\\n consents[_dataOfferingId][i].status = 0;\\r\\n }\\r\\n }\\r\\n\\r\\n DataSharingAgreement agreement = DataSharingAgreement(_addr);\\r\\n\\r\\n string[] memory consumers = agreement.notifyConsentRevoked(_dataOfferingId);\\r\\n\\r\\n emit ConsentRevoked(consumers, _dataOfferingId, _consentSubjects);\\r\\n }\\r\\n}\\r\\n\",\"keccak256\":\"0x0182ea778b83623f0148ccb6df97a84385bc36a0dc3a6fb1abf8fd729ab1fa10\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b5061135e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063ae55e4a214610046578063cf04126b1461006f578063ed59bbb514610084575b600080fd5b610059610054366004610dcc565b610097565b6040516100669190610e30565b60405180910390f35b61008261007d366004610f17565b61055e565b005b610082610092366004610fb1565b6106fc565b6060600080846040516100aa9190611063565b9081526020016040518091039020805480602002602001604051908101604052809291908181526020016000905b828210156102f557838290600052602060002090600702016040518060e001604052908160008201805461010b9061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546101379061107f565b80156101845780601f1061015957610100808354040283529160200191610184565b820191906000526020600020905b81548152906001019060200180831161016757829003601f168201915b5050505050815260200160018201805461019d9061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546101c99061107f565b80156102165780601f106101eb57610100808354040283529160200191610216565b820191906000526020600020905b8154815290600101906020018083116101f957829003601f168201915b505050918352505060028201546001600160a01b031660208201526003820180546040909201916102469061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546102729061107f565b80156102bf5780601f10610294576101008083540402835291602001916102bf565b820191906000526020600020905b8154815290600101906020018083116102a257829003601f168201915b505050505081526020016004820154815260200160058201548152602001600682015481525050815260200190600101906100d8565b5050825186519394509260609250600091508690610406578367ffffffffffffffff81111561032657610326610d07565b60405190808252806020026020018201604052801561034f578160200160208202803683370190505b50925060005b848110156104005785818151811061036f5761036f6110ba565b602002602001015160a001514211156103a7576000868281518110610396576103966110ba565b602002602001015160c00181815250505b8581815181106103b9576103b96110ba565b602002602001015160c001518484806103d1906110e6565b9550815181106103e3576103e36110ba565b6020908102919091010152806103f8816110e6565b915050610355565b50610552565b60408051600180825281830190925290602080830190803683370190505092506000610433600186611101565b90505b858181518110610448576104486110ba565b602002602001015160a0015142111561048057600086828151811061046f5761046f6110ba565b602002602001015160c00181815250505b876040516020016104919190611063565b604051602081830303815290604052805190602001208682815181106104b9576104b96110ba565b6020026020010151602001516040516020016104d59190611063565b60405160208183030381529060405280519060200120141561053e57858181518110610503576105036110ba565b602002602001015160c0015184848061051b906110e6565b95508151811061052d5761052d6110ba565b602002602001018181525050610550565b8061054881611118565b915050610436565b505b50909695505050505050565b4282101561056b57600080fd5b8181101561057857600080fd5b60005b84518110156106bb576000866040516105949190611063565b90815260200160405180910390206040518060e001604052808881526020018784815181106105c5576105c56110ba565b6020908102919091018101518252338282015260408201889052606082018790526080820186905260a09091018590528254600181018455600093845292819020825180519394600702909101926106209284920190610c6e565b5060208281015180516106399260018501920190610c6e565b50604082015160028201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117905560608201518051610688916003840191602090910190610c6e565b506080820151600482015560a0820151600582015560c090910151600690910155806106b3816110e6565b91505061057b565b507f0cd3ad4ea5f5d7b0d61f83fd8ddfa39af2844eb35e62c2e169fb28bf92def32985856040516106ed9291906111b0565b60405180910390a15050505050565b6000808360405161070d9190611063565b9081526020016040518091039020805480602002602001604051908101604052809291908181526020016000905b8282101561095857838290600052602060002090600702016040518060e001604052908160008201805461076e9061107f565b80601f016020809104026020016040519081016040528092919081815260200182805461079a9061107f565b80156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b505050505081526020016001820180546108009061107f565b80601f016020809104026020016040519081016040528092919081815260200182805461082c9061107f565b80156108795780601f1061084e57610100808354040283529160200191610879565b820191906000526020600020905b81548152906001019060200180831161085c57829003601f168201915b505050918352505060028201546001600160a01b031660208201526003820180546040909201916108a99061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546108d59061107f565b80156109225780601f106108f757610100808354040283529160200191610922565b820191906000526020600020905b81548152906001019060200180831161090557829003601f168201915b5050505050815260200160048201548152602001600582015481526020016006820154815250508152602001906001019061073b565b505050509050600081519050825160001415610a355760005b81811015610a2f57336001600160a01b03166000866040516109939190611063565b908152602001604051809103902082815481106109b2576109b26110ba565b60009182526020909120600260079092020101546001600160a01b0316146109d957600080fd5b600080866040516109ea9190611063565b90815260200160405180910390208281548110610a0957610a096110ba565b600091825260209091206006600790920201015580610a27816110e6565b915050610971565b50610ba3565b60005b81811015610ba157336001600160a01b0316600086604051610a5a9190611063565b90815260200160405180910390208281548110610a7957610a796110ba565b60009182526020909120600260079092020101546001600160a01b031614610aa057600080fd5b60005b8451811015610b8e57848181518110610abe57610abe6110ba565b6020026020010151604051602001610ad69190611063565b60405160208183030381529060405280519060200120848381518110610afe57610afe6110ba565b602002602001015160200151604051602001610b1a9190611063565b604051602081830303815290604052805190602001201415610b7c5760008087604051610b479190611063565b90815260200160405180910390208381548110610b6657610b666110ba565b9060005260206000209060070201600601819055505b80610b86816110e6565b915050610aa3565b5080610b99816110e6565b915050610a38565b505b6040516332893afb60e01b815285906000906001600160a01b038316906332893afb90610bd49089906004016111de565b60006040518083038186803b158015610bec57600080fd5b505afa158015610c00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c2891908101906111f8565b90507f633abc2421175557a8a5f1eb3b51f77faf6890ac4caf7f5b843994ed2deac55a818787604051610c5d939291906112e5565b60405180910390a150505050505050565b828054610c7a9061107f565b90600052602060002090601f016020900481019282610c9c5760008555610ce2565b82601f10610cb557805160ff1916838001178555610ce2565b82800160010185558215610ce2579182015b82811115610ce2578251825591602001919060010190610cc7565b50610cee929150610cf2565b5090565b5b80821115610cee5760008155600101610cf3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d4657610d46610d07565b604052919050565b600067ffffffffffffffff821115610d6857610d68610d07565b50601f01601f191660200190565b600082601f830112610d8757600080fd5b8135610d9a610d9582610d4e565b610d1d565b818152846020838601011115610daf57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215610ddf57600080fd5b823567ffffffffffffffff80821115610df757600080fd5b610e0386838701610d76565b93506020850135915080821115610e1957600080fd5b50610e2685828601610d76565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561055257835183529284019291840191600101610e4c565b600067ffffffffffffffff821115610e8257610e82610d07565b5060051b60200190565b600082601f830112610e9d57600080fd5b81356020610ead610d9583610e68565b82815260059290921b84018101918181019086841115610ecc57600080fd5b8286015b84811015610f0c57803567ffffffffffffffff811115610ef05760008081fd5b610efe8986838b0101610d76565b845250918301918301610ed0565b509695505050505050565b600080600080600060a08688031215610f2f57600080fd5b853567ffffffffffffffff80821115610f4757600080fd5b610f5389838a01610d76565b96506020880135915080821115610f6957600080fd5b610f7589838a01610e8c565b95506040880135915080821115610f8b57600080fd5b50610f9888828901610d76565b9598949750949560608101359550608001359392505050565b600080600060608486031215610fc657600080fd5b83356001600160a01b0381168114610fdd57600080fd5b9250602084013567ffffffffffffffff80821115610ffa57600080fd5b61100687838801610d76565b9350604086013591508082111561101c57600080fd5b5061102986828701610e8c565b9150509250925092565b60005b8381101561104e578181015183820152602001611036565b8381111561105d576000848401525b50505050565b60008251611075818460208701611033565b9190910192915050565b600181811c9082168061109357607f821691505b602082108114156110b457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156110fa576110fa6110d0565b5060010190565b600082821015611113576111136110d0565b500390565b600081611127576111276110d0565b506000190190565b60008151808452611147816020860160208601611033565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b858110156111a357828403895261119184835161112f565b98850198935090840190600101611179565b5091979650505050505050565b6040815260006111c3604083018561112f565b82810360208401526111d5818561115b565b95945050505050565b6020815260006111f1602083018461112f565b9392505050565b6000602080838503121561120b57600080fd5b825167ffffffffffffffff8082111561122357600080fd5b818501915085601f83011261123757600080fd5b8151611245610d9582610e68565b81815260059190911b8301840190848101908883111561126457600080fd5b8585015b838110156112d8578051858111156112805760008081fd5b8601603f81018b136112925760008081fd5b8781015160406112a4610d9583610d4e565b8281528d828486010111156112b95760008081fd5b6112c8838c8301848701611033565b8652505050918601918601611268565b5098975050505050505050565b6060815260006112f8606083018661115b565b828103602084015261130a818661112f565b9050828103604084015261131e818561115b565b969550505050505056fea2646970667358221220b3e5546a7a7a28e0feffcc1cc64b09fc5a2d5990e61afd84f9437a8b4cda99c064736f6c63430008090033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063ae55e4a214610046578063cf04126b1461006f578063ed59bbb514610084575b600080fd5b610059610054366004610dcc565b610097565b6040516100669190610e30565b60405180910390f35b61008261007d366004610f17565b61055e565b005b610082610092366004610fb1565b6106fc565b6060600080846040516100aa9190611063565b9081526020016040518091039020805480602002602001604051908101604052809291908181526020016000905b828210156102f557838290600052602060002090600702016040518060e001604052908160008201805461010b9061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546101379061107f565b80156101845780601f1061015957610100808354040283529160200191610184565b820191906000526020600020905b81548152906001019060200180831161016757829003601f168201915b5050505050815260200160018201805461019d9061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546101c99061107f565b80156102165780601f106101eb57610100808354040283529160200191610216565b820191906000526020600020905b8154815290600101906020018083116101f957829003601f168201915b505050918352505060028201546001600160a01b031660208201526003820180546040909201916102469061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546102729061107f565b80156102bf5780601f10610294576101008083540402835291602001916102bf565b820191906000526020600020905b8154815290600101906020018083116102a257829003601f168201915b505050505081526020016004820154815260200160058201548152602001600682015481525050815260200190600101906100d8565b5050825186519394509260609250600091508690610406578367ffffffffffffffff81111561032657610326610d07565b60405190808252806020026020018201604052801561034f578160200160208202803683370190505b50925060005b848110156104005785818151811061036f5761036f6110ba565b602002602001015160a001514211156103a7576000868281518110610396576103966110ba565b602002602001015160c00181815250505b8581815181106103b9576103b96110ba565b602002602001015160c001518484806103d1906110e6565b9550815181106103e3576103e36110ba565b6020908102919091010152806103f8816110e6565b915050610355565b50610552565b60408051600180825281830190925290602080830190803683370190505092506000610433600186611101565b90505b858181518110610448576104486110ba565b602002602001015160a0015142111561048057600086828151811061046f5761046f6110ba565b602002602001015160c00181815250505b876040516020016104919190611063565b604051602081830303815290604052805190602001208682815181106104b9576104b96110ba565b6020026020010151602001516040516020016104d59190611063565b60405160208183030381529060405280519060200120141561053e57858181518110610503576105036110ba565b602002602001015160c0015184848061051b906110e6565b95508151811061052d5761052d6110ba565b602002602001018181525050610550565b8061054881611118565b915050610436565b505b50909695505050505050565b4282101561056b57600080fd5b8181101561057857600080fd5b60005b84518110156106bb576000866040516105949190611063565b90815260200160405180910390206040518060e001604052808881526020018784815181106105c5576105c56110ba565b6020908102919091018101518252338282015260408201889052606082018790526080820186905260a09091018590528254600181018455600093845292819020825180519394600702909101926106209284920190610c6e565b5060208281015180516106399260018501920190610c6e565b50604082015160028201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117905560608201518051610688916003840191602090910190610c6e565b506080820151600482015560a0820151600582015560c090910151600690910155806106b3816110e6565b91505061057b565b507f0cd3ad4ea5f5d7b0d61f83fd8ddfa39af2844eb35e62c2e169fb28bf92def32985856040516106ed9291906111b0565b60405180910390a15050505050565b6000808360405161070d9190611063565b9081526020016040518091039020805480602002602001604051908101604052809291908181526020016000905b8282101561095857838290600052602060002090600702016040518060e001604052908160008201805461076e9061107f565b80601f016020809104026020016040519081016040528092919081815260200182805461079a9061107f565b80156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b505050505081526020016001820180546108009061107f565b80601f016020809104026020016040519081016040528092919081815260200182805461082c9061107f565b80156108795780601f1061084e57610100808354040283529160200191610879565b820191906000526020600020905b81548152906001019060200180831161085c57829003601f168201915b505050918352505060028201546001600160a01b031660208201526003820180546040909201916108a99061107f565b80601f01602080910402602001604051908101604052809291908181526020018280546108d59061107f565b80156109225780601f106108f757610100808354040283529160200191610922565b820191906000526020600020905b81548152906001019060200180831161090557829003601f168201915b5050505050815260200160048201548152602001600582015481526020016006820154815250508152602001906001019061073b565b505050509050600081519050825160001415610a355760005b81811015610a2f57336001600160a01b03166000866040516109939190611063565b908152602001604051809103902082815481106109b2576109b26110ba565b60009182526020909120600260079092020101546001600160a01b0316146109d957600080fd5b600080866040516109ea9190611063565b90815260200160405180910390208281548110610a0957610a096110ba565b600091825260209091206006600790920201015580610a27816110e6565b915050610971565b50610ba3565b60005b81811015610ba157336001600160a01b0316600086604051610a5a9190611063565b90815260200160405180910390208281548110610a7957610a796110ba565b60009182526020909120600260079092020101546001600160a01b031614610aa057600080fd5b60005b8451811015610b8e57848181518110610abe57610abe6110ba565b6020026020010151604051602001610ad69190611063565b60405160208183030381529060405280519060200120848381518110610afe57610afe6110ba565b602002602001015160200151604051602001610b1a9190611063565b604051602081830303815290604052805190602001201415610b7c5760008087604051610b479190611063565b90815260200160405180910390208381548110610b6657610b666110ba565b9060005260206000209060070201600601819055505b80610b86816110e6565b915050610aa3565b5080610b99816110e6565b915050610a38565b505b6040516332893afb60e01b815285906000906001600160a01b038316906332893afb90610bd49089906004016111de565b60006040518083038186803b158015610bec57600080fd5b505afa158015610c00573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c2891908101906111f8565b90507f633abc2421175557a8a5f1eb3b51f77faf6890ac4caf7f5b843994ed2deac55a818787604051610c5d939291906112e5565b60405180910390a150505050505050565b828054610c7a9061107f565b90600052602060002090601f016020900481019282610c9c5760008555610ce2565b82601f10610cb557805160ff1916838001178555610ce2565b82800160010185558215610ce2579182015b82811115610ce2578251825591602001919060010190610cc7565b50610cee929150610cf2565b5090565b5b80821115610cee5760008155600101610cf3565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610d4657610d46610d07565b604052919050565b600067ffffffffffffffff821115610d6857610d68610d07565b50601f01601f191660200190565b600082601f830112610d8757600080fd5b8135610d9a610d9582610d4e565b610d1d565b818152846020838601011115610daf57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060408385031215610ddf57600080fd5b823567ffffffffffffffff80821115610df757600080fd5b610e0386838701610d76565b93506020850135915080821115610e1957600080fd5b50610e2685828601610d76565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561055257835183529284019291840191600101610e4c565b600067ffffffffffffffff821115610e8257610e82610d07565b5060051b60200190565b600082601f830112610e9d57600080fd5b81356020610ead610d9583610e68565b82815260059290921b84018101918181019086841115610ecc57600080fd5b8286015b84811015610f0c57803567ffffffffffffffff811115610ef05760008081fd5b610efe8986838b0101610d76565b845250918301918301610ed0565b509695505050505050565b600080600080600060a08688031215610f2f57600080fd5b853567ffffffffffffffff80821115610f4757600080fd5b610f5389838a01610d76565b96506020880135915080821115610f6957600080fd5b610f7589838a01610e8c565b95506040880135915080821115610f8b57600080fd5b50610f9888828901610d76565b9598949750949560608101359550608001359392505050565b600080600060608486031215610fc657600080fd5b83356001600160a01b0381168114610fdd57600080fd5b9250602084013567ffffffffffffffff80821115610ffa57600080fd5b61100687838801610d76565b9350604086013591508082111561101c57600080fd5b5061102986828701610e8c565b9150509250925092565b60005b8381101561104e578181015183820152602001611036565b8381111561105d576000848401525b50505050565b60008251611075818460208701611033565b9190910192915050565b600181811c9082168061109357607f821691505b602082108114156110b457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156110fa576110fa6110d0565b5060010190565b600082821015611113576111136110d0565b500390565b600081611127576111276110d0565b506000190190565b60008151808452611147816020860160208601611033565b601f01601f19169290920160200192915050565b600081518084526020808501808196508360051b8101915082860160005b858110156111a357828403895261119184835161112f565b98850198935090840190600101611179565b5091979650505050505050565b6040815260006111c3604083018561112f565b82810360208401526111d5818561115b565b95945050505050565b6020815260006111f1602083018461112f565b9392505050565b6000602080838503121561120b57600080fd5b825167ffffffffffffffff8082111561122357600080fd5b818501915085601f83011261123757600080fd5b8151611245610d9582610e68565b81815260059190911b8301840190848101908883111561126457600080fd5b8585015b838110156112d8578051858111156112805760008081fd5b8601603f81018b136112925760008081fd5b8781015160406112a4610d9583610d4e565b8281528d828486010111156112b95760008081fd5b6112c8838c8301848701611033565b8652505050918601918601611268565b5098975050505050505050565b6060815260006112f8606083018661115b565b828103602084015261130a818661112f565b9050828103604084015261131e818561115b565b969550505050505056fea2646970667358221220b3e5546a7a7a28e0feffcc1cc64b09fc5a2d5990e61afd84f9437a8b4cda99c064736f6c63430008090033",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 1032,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "consents",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_string_memory_ptr,t_array(t_struct(Consent)1026_storage)dyn_storage)"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_struct(Consent)1026_storage)dyn_storage": {
"base": "t_struct(Consent)1026_storage",
"encoding": "dynamic_array",
"label": "struct ExplicitUserConsent.Consent[]",
"numberOfBytes": "32"
},
"t_mapping(t_string_memory_ptr,t_array(t_struct(Consent)1026_storage)dyn_storage)": {
"encoding": "mapping",
"key": "t_string_memory_ptr",
"label": "mapping(string => struct ExplicitUserConsent.Consent[])",
"numberOfBytes": "32",
"value": "t_array(t_struct(Consent)1026_storage)dyn_storage"
},
"t_string_memory_ptr": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_string_storage": {
"encoding": "bytes",
"label": "string",
"numberOfBytes": "32"
},
"t_struct(Consent)1026_storage": {
"encoding": "inplace",
"label": "struct ExplicitUserConsent.Consent",
"members": [
{
"astId": 1013,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "dataOfferingId",
"offset": 0,
"slot": "0",
"type": "t_string_storage"
},
{
"astId": 1015,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "consentSubject",
"offset": 0,
"slot": "1",
"type": "t_string_storage"
},
{
"astId": 1017,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "consentOperator",
"offset": 0,
"slot": "2",
"type": "t_address"
},
{
"astId": 1019,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "consentFormHash",
"offset": 0,
"slot": "3",
"type": "t_string_storage"
},
{
"astId": 1021,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "startDate",
"offset": 0,
"slot": "4",
"type": "t_uint256"
},
{
"astId": 1023,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "endDate",
"offset": 0,
"slot": "5",
"type": "t_uint256"
},
{
"astId": 1025,
"contract": "contracts/ExplicitUserConsent.sol:ExplicitUserConsent",
"label": "status",
"offset": 0,
"slot": "6",
"type": "t_uint256"
}
],
"numberOfBytes": "224"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}