-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,11 @@ pragma solidity 0.8.23; | |
import {IOperatorFilterRegistry} from "../interfaces/IOperatorFilterRegistry.sol"; | ||
import {Context} from "@openzeppelin/contracts/utils/Context.sol"; | ||
|
||
///@title OperatorFiltererUpgradeable | ||
/// @title OperatorFiltererUpgradeable | ||
/// @author The Sandbox | ||
/// @custom:security-contact [email protected] | ||
///@notice This contract would subscribe or copy or just to the subscription provided or just register to default subscription list | ||
///@dev This contract is the upgradeable version of the OpenSea implementation https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/OperatorFilterer.sol and adapted to the 0.5.9 solidity version | ||
/// @notice This contract would subscribe or copy or just to the subscription provided or just register to default subscription list | ||
/// @dev This contract is the upgradeable version of the OpenSea implementation https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/OperatorFilterer.sol and adapted to the 0.5.9 solidity version | ||
abstract contract OperatorFiltererUpgradeable is Context { | ||
/// @notice emitted when a registry is set | ||
/// @param registry address of the registry to set | ||
|
@@ -23,11 +23,15 @@ abstract contract OperatorFiltererUpgradeable is Context { | |
/// @notice the caller is not the operator | ||
error OperatorNotAllowed(); | ||
|
||
/// @notice Used in approval operations to check if the operator is allowed to call this contract | ||
/// @param operator The address receiving the approval | ||
modifier onlyAllowedOperatorApproval(address operator) virtual { | ||
_checkIsOperatorAllowed(address(this), operator); | ||
_; | ||
} | ||
|
||
/// @notice Used in transfer from operations to check if the sender of the token is allowed to call this contract | ||
/// @param from the sender of the token | ||
modifier onlyAllowedOperator(address from) virtual { | ||
IOperatorFilterRegistry registry = _readOperatorFilterRegistry(); | ||
// Check registry code length to facilitate testing in environments without a deployed registry. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
360c657
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report