Skip to content

Commit

Permalink
Update natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-turek committed Aug 16, 2023
1 parent d6a29e6 commit 401de93
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/asset/contracts/AssetReveal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ pragma solidity 0.8.18;

import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";
import {
AccessControlUpgradeable,
ContextUpgradeable
} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import {AccessControlUpgradeable, ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import {TokenIdUtils} from "./libraries/TokenIdUtils.sol";
import {AuthSuperValidator} from "./AuthSuperValidator.sol";
import {
ERC2771HandlerUpgradeable
} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {ERC2771HandlerUpgradeable} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {IAsset} from "./interfaces/IAsset.sol";
import {IAssetReveal} from "./interfaces/IAssetReveal.sol";

Expand Down Expand Up @@ -362,10 +357,10 @@ contract AssetReveal is
/// @param metadataHashes The hashes of the metadata
/// @param prevTokenId The previous token id from which the assets are revealed
/// @return tokenIdArray The array of tokenIds to mint
function getRevealedTokenIds(string[] calldata metadataHashes, uint256 prevTokenId)
internal
returns (uint256[] memory)
{
function getRevealedTokenIds(
string[] calldata metadataHashes,
uint256 prevTokenId
) internal returns (uint256[] memory) {
IAsset.AssetData memory data = prevTokenId.getData();
require(!data.revealed, "AssetReveal: already revealed");
uint256[] memory tokenIdArray = new uint256[](metadataHashes.length);
Expand Down Expand Up @@ -405,11 +400,15 @@ contract AssetReveal is
}

/// @notice Set permission for instant reveal for a given tier
/// @param tier the tier to set the permission for
/// @param allowed allow or disallow instant reveal for the given tier
function setTierInstantRevealAllowed(uint8 tier, bool allowed) external onlyRole(DEFAULT_ADMIN_ROLE) {
tierInstantRevealAllowed[tier] = allowed;
}

/// @notice Get permission for instant reveal for a given tier
/// @param tier The tier to check
/// @return Whether instant reveal is allowed for the given tier
function getTierInstantRevealAllowed(uint8 tier) external view returns (bool) {
return tierInstantRevealAllowed[tier];
}
Expand Down

1 comment on commit 401de93

@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

97.05%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
packages/asset/contracts
   Asset.sol94.53%89.58%96.43%98.08%108, 193, 298, 298–299, 70
   AssetCreate.sol93.42%75%100%100%125, 127, 160, 266, 64
   AssetReveal.sol94.90%86.36%96.30%98.84%136, 170, 365, 405, 413, 420, 66
   AuthSuperValidator.sol100%100%100%100%
   Catalyst.sol94.81%91.94%95.24%98.08%133, 135, 148, 160, 231, 88
packages/asset/contracts/interfaces
   IAsset.sol100%100%100%100%
   IAssetCreate.sol100%100%100%100%
   IAssetReveal.sol100%100%100%100%
   ICatalyst.sol100%100%100%100%
   ITokenUtils.sol100%100%100%100%
packages/asset/contracts/libraries
   TokenIdUtils.sol100%100%100%100%
packages/dependency-metatx/contracts
   ERC2771Handler.sol100%100%100%100%
   ERC2771HandlerAbstract.sol100%100%100%100%
   ERC2771HandlerUpgradeable.sol95.45%83.33%100%100%43
packages/dependency-metatx/contracts/test
   ERC2771HandlerTest.sol100%100%100%100%
   ERC2771HandlerUpgradeableTest.sol100%100%100%100%
   MockTrustedForwarder.sol0%0%0%0%15, 18–19, 19, 19–20
packages/dependency-operator-filter/contracts
   OperatorFiltererUpgradeable.sol88.64%85%100%90%14, 48–49, 58–59
   OperatorFilterSubscription.sol60%50%100%50%18–19
packages/dependency-operator-filter/contracts/interfaces
   IOperatorFilterRegistry.sol100%100%100%100%
packages/dependency-royalty-management/contracts
   MultiRoyaltyDistributor.sol88.71%62.50%100%97.44%101, 108, 41, 41, 41, 41, 70
   RoyaltyDistributor.sol90.91%50%100%100%44
   RoyaltyManager.sol96%86.36%100%100%100, 44, 94
   RoyaltySplitter.sol90.91%75%92.31%95.89%107, 147, 167, 176, 191, 228, 56, 63, 78
packages/dependency-royalty-management/contracts/interfaces
   IERC20Approve.sol100%100%100%100%
   IMultiRoyaltyDistributor.sol100%100%100%100%
   IMultiRoyaltyRecipients.sol100%100%100%100%
   IRoyaltyManager.sol100%100%100%100%
   IRoyaltyUGC.sol100%100%100%100%

Please sign in to comment.