@@ -16,7 +16,7 @@ abstract contract OperatorFiltererUpgradeable is Initializable {
1616 /// @notice Emitted when an operator is not allowed.
1717 error OperatorNotAllowed (address operator );
1818
19- IOperatorFilterRegistry constant operatorFilterRegistry =
19+ IOperatorFilterRegistry constant OPERATOR_FILTER_REGISTRY =
2020 IOperatorFilterRegistry (0x000000000000AAeB6D7670E522A718067333cd4E );
2121
2222 /// @dev The upgradeable initialize function that should be called when the contract is being upgraded.
@@ -27,15 +27,15 @@ abstract contract OperatorFiltererUpgradeable is Initializable {
2727 // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
2828 // will not revert, but the contract will need to be registered with the registry once it is deployed in
2929 // order for the modifier to filter addresses.
30- if (address (operatorFilterRegistry ).code.length > 0 ) {
31- if (! operatorFilterRegistry .isRegistered (address (this ))) {
30+ if (address (OPERATOR_FILTER_REGISTRY ).code.length > 0 ) {
31+ if (! OPERATOR_FILTER_REGISTRY .isRegistered (address (this ))) {
3232 if (subscribe) {
33- operatorFilterRegistry .registerAndSubscribe (address (this ), subscriptionOrRegistrantToCopy);
33+ OPERATOR_FILTER_REGISTRY .registerAndSubscribe (address (this ), subscriptionOrRegistrantToCopy);
3434 } else {
3535 if (subscriptionOrRegistrantToCopy != address (0 )) {
36- operatorFilterRegistry .registerAndCopyEntries (address (this ), subscriptionOrRegistrantToCopy);
36+ OPERATOR_FILTER_REGISTRY .registerAndCopyEntries (address (this ), subscriptionOrRegistrantToCopy);
3737 } else {
38- operatorFilterRegistry .register (address (this ));
38+ OPERATOR_FILTER_REGISTRY .register (address (this ));
3939 }
4040 }
4141 }
@@ -68,11 +68,11 @@ abstract contract OperatorFiltererUpgradeable is Initializable {
6868 */
6969 function _checkFilterOperator (address operator ) internal view virtual {
7070 // Check registry code length to facilitate testing in environments without a deployed registry.
71- if (address (operatorFilterRegistry ).code.length > 0 ) {
71+ if (address (OPERATOR_FILTER_REGISTRY ).code.length > 0 ) {
7272 // under normal circumstances, this function will revert rather than return false, but inheriting or
7373 // upgraded contracts may specify their own OperatorFilterRegistry implementations, which may behave
7474 // differently
75- if (! operatorFilterRegistry .isOperatorAllowed (address (this ), operator)) {
75+ if (! OPERATOR_FILTER_REGISTRY .isOperatorAllowed (address (this ), operator)) {
7676 revert OperatorNotAllowed (operator);
7777 }
7878 }
0 commit comments