Skip to content

Commit

Permalink
fix: Whitelist onlyInitializing
Browse files Browse the repository at this point in the history
  • Loading branch information
adjisb committed Oct 6, 2023
1 parent de73e19 commit 9dcdf81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/marketplace/contracts/exchange/WhiteList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

pragma solidity 0.8.21;

import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {AccessControlEnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
import {IWhiteList} from "../interfaces/IWhiteList.sol";

/// @title WhiteList contract
/// @dev controls which tokens are accepted in the marketplace
contract WhiteList is IWhiteList, AccessControlEnumerableUpgradeable {
contract WhiteList is Initializable, IWhiteList, AccessControlEnumerableUpgradeable {
/// @notice role for The Sandbox tokens
/// @return hash for TSB_ROLE
bytes32 public constant TSB_ROLE = keccak256("TSB_ROLE");
Expand Down Expand Up @@ -60,7 +61,7 @@ contract WhiteList is IWhiteList, AccessControlEnumerableUpgradeable {
bool newPartners,
bool newOpen,
bool newErc20List
) internal initializer {
) internal onlyInitializing {
__AccessControlEnumerable_init_unchained();
_grantRole(DEFAULT_ADMIN_ROLE, admin);
_setPermissions(newTsbOnly, newPartners, newOpen, newErc20List);
Expand Down

1 comment on commit 9dcdf81

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage for this commit

86.99%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/marketplace/contracts/exchange
   Exchange.sol79.71%70%87.50%86.96%174, 63, 79, 89, 89, 89, 89–90, 90, 90–91, 98
   ExchangeCore.sol84.81%61.54%100%95.45%118–119, 119, 119, 122, 188, 190, 194, 215–216, 64, 94
   OrderValidator.sol89.29%84.62%100%92%41, 71–72, 72, 72, 76
   WhiteList.sol97.62%93.75%100%100%64
packages/marketplace/contracts/exchange/libraries
   LibFill.sol60.87%33.33%75%69.23%32–33, 58, 68–69, 69, 69–70
   LibMath.sol27.50%18.75%50%30%100–103, 17–18, 33–34, 50, 50, 50–51, 72, 72, 72–73, 75, 88, 88, 88–89, 93, 93, 93, 93, 93, 97
packages/marketplace/contracts/interfaces
   IOrderValidator.sol100%100%100%100%
   IRoyaltiesProvider.sol100%100%100%100%
   IWhiteList.sol100%100%100%100%
packages/marketplace/contracts/lib-asset
   LibAsset.sol100%100%100%100%
packages/marketplace/contracts/lib-bp
   BpLibrary.sol100%100%100%100%
packages/marketplace/contracts/lib-order
   LibOrder.sol73.33%50%100%100%64, 64, 66, 66
packages/marketplace/contracts/lib-part
   LibPart.sol0%100%0%0%21
packages/marketplace/contracts/royalties
   IERC2981.sol100%100%100%100%
   LibRoyalties2981.sol78.57%50%100%88.89%19–20, 23
packages/marketplace/contracts/royalties-registry
   IMultiRoyaltyRecipients.sol100%100%100%100%
   RoyaltiesRegistry.sol90.40%85.29%100%90.79%166–167, 170–171, 212, 216, 247, 250, 256, 259, 276, 60
packages/marketplace/contracts/transfer-manager
   TransferExecutor.sol90.48%75%100%100%24, 30
   TransferManager.sol81.65%68.97%100%87.50%137, 190, 199, 206–207, 207, 207–208, 212, 220, 227–228, 252, 269, 273–275, 275, 275–277, 282–283, 306, 310–311, 62, 82–83
packages/marketplace/contracts/transfer-manager/interfaces
   IRoyaltyUGC.sol100%100%100%100%
   ITransferExecutor.sol100%100%100%100%
   ITransferManager.sol100%100%100%100%

Please sign in to comment.