|
|
|
@ -4,8 +4,8 @@ |
|
|
|
|
pragma solidity ^0.8.19; |
|
|
|
|
|
|
|
|
|
import "../access/AccessControl.sol"; |
|
|
|
|
import "../token/ERC721/IERC721Receiver.sol"; |
|
|
|
|
import "../token/ERC1155/IERC1155Receiver.sol"; |
|
|
|
|
import "../token/ERC721/utils/ERC721Holder.sol"; |
|
|
|
|
import "../token/ERC1155/utils/ERC1155Holder.sol"; |
|
|
|
|
import "../utils/Address.sol"; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -23,7 +23,7 @@ import "../utils/Address.sol"; |
|
|
|
|
* |
|
|
|
|
* _Available since v3.3._ |
|
|
|
|
*/ |
|
|
|
|
contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver { |
|
|
|
|
contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder { |
|
|
|
|
bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); |
|
|
|
|
bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); |
|
|
|
|
bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE"); |
|
|
|
@ -155,8 +155,10 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver |
|
|
|
|
/** |
|
|
|
|
* @dev See {IERC165-supportsInterface}. |
|
|
|
|
*/ |
|
|
|
|
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, AccessControl) returns (bool) { |
|
|
|
|
return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); |
|
|
|
|
function supportsInterface( |
|
|
|
|
bytes4 interfaceId |
|
|
|
|
) public view virtual override(AccessControl, ERC1155Receiver) returns (bool) { |
|
|
|
|
return super.supportsInterface(interfaceId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -430,31 +432,4 @@ contract TimelockController is AccessControl, IERC721Receiver, IERC1155Receiver |
|
|
|
|
emit MinDelayChange(_minDelay, newDelay); |
|
|
|
|
_minDelay = newDelay; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @dev See {IERC721Receiver-onERC721Received}. |
|
|
|
|
*/ |
|
|
|
|
function onERC721Received(address, address, uint256, bytes memory) public virtual returns (bytes4) { |
|
|
|
|
return this.onERC721Received.selector; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @dev See {IERC1155Receiver-onERC1155Received}. |
|
|
|
|
*/ |
|
|
|
|
function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual returns (bytes4) { |
|
|
|
|
return this.onERC1155Received.selector; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @dev See {IERC1155Receiver-onERC1155BatchReceived}. |
|
|
|
|
*/ |
|
|
|
|
function onERC1155BatchReceived( |
|
|
|
|
address, |
|
|
|
|
address, |
|
|
|
|
uint256[] memory, |
|
|
|
|
uint256[] memory, |
|
|
|
|
bytes memory |
|
|
|
|
) public virtual returns (bytes4) { |
|
|
|
|
return this.onERC1155BatchReceived.selector; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|