Skip to content

Commit

Permalink
fix: updated contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh Sharma committed Aug 9, 2023
1 parent 0cb0091 commit 16c79fe
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 22 deletions.
7 changes: 3 additions & 4 deletions packages/asset/contracts/Asset.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import {
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import {
ERC2771HandlerUpgradeable,
ERC2771HandlerAbstract
ERC2771HandlerUpgradeable
} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {
MultiRoyaltyDistributor
Expand Down Expand Up @@ -212,7 +211,7 @@ contract Asset is
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (address sender)
{
return ERC2771HandlerUpgradeable._msgSender();
Expand All @@ -222,7 +221,7 @@ contract Asset is
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (bytes calldata)
{
return ERC2771HandlerUpgradeable._msgData();
Expand Down
7 changes: 3 additions & 4 deletions packages/asset/contracts/Catalyst.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ import {
} from "@sandbox-smart-contracts/dependency-royalty-management/contracts/interfaces/IRoyaltyManager.sol";
import {IERC2981Upgradeable} from "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";
import {
ERC2771HandlerUpgradeable,
ERC2771HandlerAbstract
ERC2771HandlerUpgradeable
} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {ICatalyst} from "./interfaces/ICatalyst.sol";

Expand Down Expand Up @@ -215,7 +214,7 @@ contract Catalyst is
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (address)
{
return ERC2771HandlerUpgradeable._msgSender();
Expand All @@ -226,7 +225,7 @@ contract Catalyst is
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (bytes calldata)
{
return ERC2771HandlerUpgradeable._msgData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ pragma solidity ^0.8.0;

import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {IOperatorFilterRegistry} from "./interfaces/IOperatorFilterRegistry.sol";
import {ERC2771HandlerAbstract} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerAbstract.sol";
import {ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";

///@title OperatorFiltererUpgradeable
///@author The SandBox
///@notice This contract would subscibe or copy or just to the subscription provided or just register to default subscription list. The operator filter registry's addess could be set using a setter which could be implemented in inherting contract
abstract contract OperatorFiltererUpgradeable is Initializable, ERC2771HandlerAbstract {
abstract contract OperatorFiltererUpgradeable is Initializable, ContextUpgradeable {
IOperatorFilterRegistry public operatorFilterRegistry;

function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe) internal onlyInitializing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {
ERC2771HandlerUpgradeable,
ERC2771HandlerAbstract
ERC2771HandlerUpgradeable
} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {OperatorFiltererUpgradeable} from "../OperatorFiltererUpgradeable.sol";

Expand Down Expand Up @@ -99,7 +98,7 @@ contract TestERC1155 is ERC1155Upgradeable, OperatorFiltererUpgradeable, ERC2771
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (address sender)
{
return ERC2771HandlerUpgradeable._msgSender();
Expand All @@ -109,7 +108,7 @@ contract TestERC1155 is ERC1155Upgradeable, OperatorFiltererUpgradeable, ERC2771
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (bytes calldata)
{
return ERC2771HandlerUpgradeable._msgData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {
} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import {OperatorFiltererUpgradeable} from "../OperatorFiltererUpgradeable.sol";
import {
ERC2771HandlerUpgradeable,
ERC2771HandlerAbstract
ERC2771HandlerUpgradeable
} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {IOperatorFilterRegistry} from "../interfaces/IOperatorFilterRegistry.sol";

Expand Down Expand Up @@ -75,7 +74,7 @@ contract TestERC721 is ERC721Upgradeable, OperatorFiltererUpgradeable, ERC2771Ha
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (address sender)
{
return ERC2771HandlerUpgradeable._msgSender();
Expand All @@ -85,7 +84,7 @@ contract TestERC721 is ERC721Upgradeable, OperatorFiltererUpgradeable, ERC2771Ha
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (bytes calldata)
{
return ERC2771HandlerUpgradeable._msgData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import {OperatorFiltererUpgradeable} from "../OperatorFiltererUpgradeable.sol";
import {
ERC2771HandlerUpgradeable,
ERC2771HandlerAbstract
ERC2771HandlerUpgradeable
} from "@sandbox-smart-contracts/dependency-metatx/contracts/ERC2771HandlerUpgradeable.sol";
import {IOperatorFilterRegistry} from "../interfaces/IOperatorFilterRegistry.sol";

Expand Down Expand Up @@ -117,7 +116,7 @@ contract UnregisteredToken is ERC1155Upgradeable, OperatorFiltererUpgradeable, E
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (address sender)
{
return ERC2771HandlerUpgradeable._msgSender();
Expand All @@ -127,7 +126,7 @@ contract UnregisteredToken is ERC1155Upgradeable, OperatorFiltererUpgradeable, E
internal
view
virtual
override(ContextUpgradeable, ERC2771HandlerUpgradeable, ERC2771HandlerAbstract)
override(ContextUpgradeable, ERC2771HandlerUpgradeable)
returns (bytes calldata)
{
return ERC2771HandlerUpgradeable._msgData();
Expand Down

1 comment on commit 16c79fe

@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.23%

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.sol96.60%87.50%100%100%138, 170, 365, 406, 68
   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.