4
4
pragma solidity ^ 0.8.19 ;
5
5
6
6
import "../access/AccessControl.sol " ;
7
- import "../token/ERC721/IERC721Receiver .sol " ;
8
- import "../token/ERC1155/IERC1155Receiver .sol " ;
7
+ import "../token/ERC721/utils/ERC721Holder .sol " ;
8
+ import "../token/ERC1155/utils/ERC1155Holder .sol " ;
9
9
import "../utils/Address.sol " ;
10
10
11
11
/**
@@ -23,7 +23,7 @@ import "../utils/Address.sol";
23
23
*
24
24
* _Available since v3.3._
25
25
*/
26
- contract TimelockController is AccessControl , IERC721Receiver , IERC1155Receiver {
26
+ contract TimelockController is AccessControl , ERC721Holder , ERC1155Holder {
27
27
bytes32 public constant PROPOSER_ROLE = keccak256 ("PROPOSER_ROLE " );
28
28
bytes32 public constant EXECUTOR_ROLE = keccak256 ("EXECUTOR_ROLE " );
29
29
bytes32 public constant CANCELLER_ROLE = keccak256 ("CANCELLER_ROLE " );
@@ -155,8 +155,10 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver
155
155
/**
156
156
* @dev See {IERC165-supportsInterface}.
157
157
*/
158
- function supportsInterface (bytes4 interfaceId ) public view virtual override (IERC165 , AccessControl) returns (bool ) {
159
- return interfaceId == type (IERC1155Receiver ).interfaceId || super .supportsInterface (interfaceId);
158
+ function supportsInterface (
159
+ bytes4 interfaceId
160
+ ) public view virtual override (AccessControl, ERC1155Receiver ) returns (bool ) {
161
+ return super .supportsInterface (interfaceId);
160
162
}
161
163
162
164
/**
@@ -430,31 +432,4 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver
430
432
emit MinDelayChange (_minDelay, newDelay);
431
433
_minDelay = newDelay;
432
434
}
433
-
434
- /**
435
- * @dev See {IERC721Receiver-onERC721Received}.
436
- */
437
- function onERC721Received (address , address , uint256 , bytes memory ) public virtual returns (bytes4 ) {
438
- return this .onERC721Received.selector ;
439
- }
440
-
441
- /**
442
- * @dev See {IERC1155Receiver-onERC1155Received}.
443
- */
444
- function onERC1155Received (address , address , uint256 , uint256 , bytes memory ) public virtual returns (bytes4 ) {
445
- return this .onERC1155Received.selector ;
446
- }
447
-
448
- /**
449
- * @dev See {IERC1155Receiver-onERC1155BatchReceived}.
450
- */
451
- function onERC1155BatchReceived (
452
- address ,
453
- address ,
454
- uint256 [] memory ,
455
- uint256 [] memory ,
456
- bytes memory
457
- ) public virtual returns (bytes4 ) {
458
- return this .onERC1155BatchReceived.selector ;
459
- }
460
435
}
0 commit comments