4
4
// solhint-disable-next-line compiler-version
5
5
pragma solidity ^ 0.8.20 ;
6
6
7
- import {ZoneInterface} from "seaport/contracts/interfaces/ZoneInterface.sol " ;
8
- import {ZoneParameters, Schema, ReceivedItem} from "seaport-types/src/lib/ConsiderationStructs.sol " ;
9
7
import {AccessControlEnumerable} from "openzeppelin-contracts-5.0.2/access/extensions/AccessControlEnumerable.sol " ;
10
8
import {ECDSA} from "openzeppelin-contracts-5.0.2/utils/cryptography/ECDSA.sol " ;
11
9
import {MessageHashUtils} from "openzeppelin-contracts-5.0.2/utils/cryptography/MessageHashUtils.sol " ;
12
10
import {ERC165 } from "openzeppelin-contracts-5.0.2/utils/introspection/ERC165.sol " ;
13
11
import {Math} from "openzeppelin-contracts-5.0.2/utils/math/Math.sol " ;
12
+ import {ZoneInterface} from "seaport/contracts/interfaces/ZoneInterface.sol " ;
13
+ import {ZoneParameters, Schema, ReceivedItem} from "seaport-types/src/lib/ConsiderationStructs.sol " ;
14
+ import {ZoneAccessControl} from "./ZoneAccessControl.sol " ;
14
15
import {SIP5Interface} from "./interfaces/SIP5Interface.sol " ;
15
16
import {SIP6Interface} from "./interfaces/SIP6Interface.sol " ;
16
17
import {SIP7Interface} from "./interfaces/SIP7Interface.sol " ;
@@ -24,11 +25,11 @@ import {SIP7Interface} from "./interfaces/SIP7Interface.sol";
24
25
*/
25
26
contract ImmutableSignedZoneV2 is
26
27
ERC165 ,
28
+ ZoneAccessControl ,
27
29
ZoneInterface ,
28
30
SIP5Interface ,
29
31
SIP6Interface ,
30
- SIP7Interface ,
31
- AccessControlEnumerable
32
+ SIP7Interface
32
33
{
33
34
/// @dev The EIP-712 domain type hash.
34
35
bytes32 private constant _EIP_712_DOMAIN_TYPEHASH = keccak256 (
@@ -82,7 +83,9 @@ contract ImmutableSignedZoneV2 is
82
83
* @param owner The address of the owner of this contract. Specified in the
83
84
* constructor to be CREATE2 / CREATE3 compatible.
84
85
*/
85
- constructor (string memory zoneName , string memory apiEndpoint , string memory documentationURI , address owner ) {
86
+ constructor (string memory zoneName , string memory apiEndpoint , string memory documentationURI , address owner )
87
+ ZoneAccessControl (owner)
88
+ {
86
89
// Set the zone name.
87
90
_ZONE_NAME = zoneName;
88
91
@@ -100,17 +103,14 @@ contract ImmutableSignedZoneV2 is
100
103
101
104
// Emit an event to signal a SIP-5 contract has been deployed.
102
105
emit SeaportCompatibleContractDeployed ();
103
-
104
- // Grant admin role to the specified owner.
105
- _grantRole (DEFAULT_ADMIN_ROLE, owner);
106
106
}
107
107
108
108
/**
109
109
* @notice Add a new signer to the zone.
110
110
*
111
111
* @param signer The new signer address to add.
112
112
*/
113
- function addSigner (address signer ) external override onlyRole (DEFAULT_ADMIN_ROLE ) {
113
+ function addSigner (address signer ) external override onlyRole (ZONE_MANAGER_ROLE ) {
114
114
// Do not allow the zero address to be added as a signer.
115
115
if (signer == address (0 )) {
116
116
revert SignerCannotBeZeroAddress ();
@@ -140,7 +140,7 @@ contract ImmutableSignedZoneV2 is
140
140
*
141
141
* @param signer The signer address to remove.
142
142
*/
143
- function removeSigner (address signer ) external override onlyRole (DEFAULT_ADMIN_ROLE ) {
143
+ function removeSigner (address signer ) external override onlyRole (ZONE_MANAGER_ROLE ) {
144
144
// Revert if the signer is not active.
145
145
if (! _signers[signer].active) {
146
146
revert SignerNotActive (signer);
@@ -158,7 +158,7 @@ contract ImmutableSignedZoneV2 is
158
158
*
159
159
* @param newApiEndpoint The new API endpoint.
160
160
*/
161
- function updateAPIEndpoint (string calldata newApiEndpoint ) external override onlyRole (DEFAULT_ADMIN_ROLE ) {
161
+ function updateAPIEndpoint (string calldata newApiEndpoint ) external override onlyRole (ZONE_MANAGER_ROLE ) {
162
162
_apiEndpoint = newApiEndpoint;
163
163
}
164
164
@@ -170,7 +170,7 @@ contract ImmutableSignedZoneV2 is
170
170
function updateDocumentationURI (string calldata newDocumentationURI )
171
171
external
172
172
override
173
- onlyRole (DEFAULT_ADMIN_ROLE )
173
+ onlyRole (ZONE_MANAGER_ROLE )
174
174
{
175
175
_documentationURI = newDocumentationURI;
176
176
}
0 commit comments