@@ -166,7 +166,12 @@ contract DataProtectorSharing is
166166 _workerpoolOrder.category
167167 );
168168
169- dealid = POCO_DELEGATE.matchOrders (_appOrder, _datasetOrder, _workerpoolOrder, requestOrder);
169+ dealid = POCO_DELEGATE.matchOrders (
170+ _appOrder,
171+ _datasetOrder,
172+ _workerpoolOrder,
173+ requestOrder
174+ );
170175 emit ProtectedDataConsumed (dealid, _protectedData, _mode);
171176 }
172177
@@ -178,7 +183,11 @@ contract DataProtectorSharing is
178183
179184 // Overide burn function from ERC721BurnableUpgradeable.
180185 // Enable to burn a collectionTokenID.
181- function _update (address to , uint256 _collectionTokenId , address auth ) internal virtual override returns (address ) {
186+ function _update (
187+ address to ,
188+ uint256 _collectionTokenId ,
189+ address auth
190+ ) internal virtual override returns (address ) {
182191 CollectionDetails storage _collectionDetails = collectionDetails[_collectionTokenId];
183192 if (to == address (0 )) {
184193 if (_collectionDetails.size > 0 ) {
@@ -192,7 +201,10 @@ contract DataProtectorSharing is
192201 }
193202
194203 /// @inheritdoc IDataProtectorSharing
195- function getProtectedDataRenter (address _protectedData , address _renterAddress ) public view returns (uint48 ) {
204+ function getProtectedDataRenter (
205+ address _protectedData ,
206+ address _renterAddress
207+ ) public view returns (uint48 ) {
196208 return protectedDataDetails[_protectedData].renters[_renterAddress];
197209 }
198210
@@ -205,7 +217,12 @@ contract DataProtectorSharing is
205217 }
206218
207219 /// @inheritdoc IDataProtectorSharing
208- function receiveApproval (address _sender , uint256 , address , bytes calldata _extraData ) public returns (bool ) {
220+ function receiveApproval (
221+ address _sender ,
222+ uint256 ,
223+ address ,
224+ bytes calldata _extraData
225+ ) public returns (bool ) {
209226 if (msg .sender != address (POCO_DELEGATE)) {
210227 revert OnlyPocoCallerAuthorized (msg .sender );
211228 }
@@ -229,7 +246,10 @@ contract DataProtectorSharing is
229246 _rentProtectedData (protectedData, _sender, rentingParams);
230247 return true ;
231248 } else if (selector == this .buyProtectedData.selector ) {
232- (address protectedData , address to , uint72 price ) = abi.decode (_extraData[4 :], (address , address , uint72 ));
249+ (address protectedData , address to , uint72 price ) = abi.decode (
250+ _extraData[4 :],
251+ (address , address , uint72 )
252+ );
233253 _buyProtectedData (protectedData, _sender, to, price);
234254 return true ;
235255 }
@@ -291,7 +311,11 @@ contract DataProtectorSharing is
291311
292312 delete protectedDataDetails[_protectedData];
293313 collectionDetails[_collectionTokenId].size -= 1 ;
294- PROTECTED_DATA_REGISTRY.safeTransferFrom (address (this ), msg .sender , uint256 (uint160 (_protectedData)));
314+ PROTECTED_DATA_REGISTRY.safeTransferFrom (
315+ address (this ),
316+ msg .sender ,
317+ uint256 (uint160 (_protectedData))
318+ );
295319 emit ProtectedDataTransfer (_protectedData, 0 , _collectionTokenId, address (0 ));
296320 }
297321
@@ -327,7 +351,11 @@ contract DataProtectorSharing is
327351 _collectionDetails.lastSubscriptionExpiration = uint48 (
328352 Math.max (endDate, _collectionDetails.lastSubscriptionExpiration)
329353 );
330- POCO_DELEGATE.transferFrom (spender, ownerOf (_collectionTokenId), _collectionDetails.subscriptionParams.price);
354+ POCO_DELEGATE.transferFrom (
355+ spender,
356+ ownerOf (_collectionTokenId),
357+ _collectionDetails.subscriptionParams.price
358+ );
331359 emit NewSubscription (_collectionTokenId, spender, endDate);
332360 }
333361
@@ -354,7 +382,10 @@ contract DataProtectorSharing is
354382 }
355383
356384 /// @inheritdoc ISubscription
357- function setSubscriptionParams (uint256 _collectionTokenId , SubscriptionParams calldata _subscriptionParams ) public {
385+ function setSubscriptionParams (
386+ uint256 _collectionTokenId ,
387+ SubscriptionParams calldata _subscriptionParams
388+ ) public {
358389 _checkCollectionOperator (_collectionTokenId);
359390
360391 collectionDetails[_collectionTokenId].subscriptionParams = _subscriptionParams;
@@ -405,7 +436,10 @@ contract DataProtectorSharing is
405436 }
406437
407438 /// @inheritdoc IRental
408- function setProtectedDataToRenting (address _protectedData , RentingParams calldata _rentingParams ) public {
439+ function setProtectedDataToRenting (
440+ address _protectedData ,
441+ RentingParams calldata _rentingParams
442+ ) public {
409443 ProtectedDataDetails storage _protectedDataDetails = protectedDataDetails[_protectedData];
410444 uint256 _collectionTokenId = _protectedDataDetails.collection;
411445 _checkCollectionOperator (_collectionTokenId);
@@ -436,14 +470,23 @@ contract DataProtectorSharing is
436470 return _buyProtectedData (_protectedData, msg .sender , _to, _price);
437471 }
438472
439- function _buyProtectedData (address _protectedData , address spender , address _to , uint72 _price ) private {
473+ function _buyProtectedData (
474+ address _protectedData ,
475+ address spender ,
476+ address _to ,
477+ uint72 _price
478+ ) private {
440479 ProtectedDataDetails storage _protectedDataDetails = protectedDataDetails[_protectedData];
441480 _checkProtectedDataForSale (_protectedData);
442481 if (_protectedDataDetails.sellingParams.price != _price) {
443482 revert InvalidPriceForPurchase (_protectedData, _price);
444483 }
445484
446- PROTECTED_DATA_REGISTRY.safeTransferFrom (address (this ), _to, uint256 (uint160 (_protectedData)));
485+ PROTECTED_DATA_REGISTRY.safeTransferFrom (
486+ address (this ),
487+ _to,
488+ uint256 (uint160 (_protectedData))
489+ );
447490 POCO_DELEGATE.transferFrom (
448491 spender,
449492 ownerOf (_protectedDataDetails.collection),
0 commit comments