diff --git a/contracts/access/AccessControl.sol b/contracts/access/AccessControl.sol index aa6645532..bd09eed8b 100644 --- a/contracts/access/AccessControl.sol +++ b/contracts/access/AccessControl.sol @@ -5,7 +5,7 @@ pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; -import {ERC165} from "../utils/introspection/ERC165.sol"; +import {IERC165, ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access @@ -65,9 +65,7 @@ abstract contract AccessControl is Context, IAccessControl, ERC165 { _; } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } diff --git a/contracts/access/extensions/AccessControlDefaultAdminRules.sol b/contracts/access/extensions/AccessControlDefaultAdminRules.sol index ef71a648c..6875fbf56 100644 --- a/contracts/access/extensions/AccessControlDefaultAdminRules.sol +++ b/contracts/access/extensions/AccessControlDefaultAdminRules.sol @@ -8,6 +8,7 @@ import {AccessControl, IAccessControl} from "../AccessControl.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; import {Math} from "../../utils/math/Math.sol"; import {IERC5313} from "../../interfaces/IERC5313.sol"; +import {IERC165} from "../../utils/introspection/ERC165.sol"; /** * @dev Extension of {AccessControl} that allows specifying special rules to manage @@ -59,16 +60,12 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu _grantRole(DEFAULT_ADMIN_ROLE, initialDefaultAdmin); } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlDefaultAdminRules).interfaceId || super.supportsInterface(interfaceId); } - /** - * @dev See {IERC5313-owner}. - */ + /// @inheritdoc IERC5313 function owner() public view virtual returns (address) { return defaultAdmin(); } @@ -140,9 +137,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu return super._grantRole(role, account); } - /** - * @dev See {AccessControl-_revokeRole}. - */ + /// @inheritdoc AccessControl function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { if (role == DEFAULT_ADMIN_ROLE && account == defaultAdmin()) { delete _currentDefaultAdmin; @@ -164,39 +159,29 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// AccessControlDefaultAdminRules accessors /// - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdmin() public view virtual returns (address) { return _currentDefaultAdmin; } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function pendingDefaultAdmin() public view virtual returns (address newAdmin, uint48 schedule) { return (_pendingDefaultAdmin, _pendingDefaultAdminSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdminDelay() public view virtual returns (uint48) { uint48 schedule = _pendingDelaySchedule; return (_isScheduleSet(schedule) && _hasSchedulePassed(schedule)) ? _pendingDelay : _currentDelay; } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function pendingDefaultAdminDelay() public view virtual returns (uint48 newDelay, uint48 schedule) { schedule = _pendingDelaySchedule; return (_isScheduleSet(schedule) && !_hasSchedulePassed(schedule)) ? (_pendingDelay, schedule) : (0, 0); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function defaultAdminDelayIncreaseWait() public view virtual returns (uint48) { return 5 days; } @@ -205,9 +190,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// AccessControlDefaultAdminRules public and internal setters for defaultAdmin/pendingDefaultAdmin /// - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function beginDefaultAdminTransfer(address newAdmin) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _beginDefaultAdminTransfer(newAdmin); } @@ -223,9 +206,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu emit DefaultAdminTransferScheduled(newAdmin, newSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function cancelDefaultAdminTransfer() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _cancelDefaultAdminTransfer(); } @@ -239,9 +220,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu _setPendingDefaultAdmin(address(0), 0); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function acceptDefaultAdminTransfer() public virtual { (address newDefaultAdmin, ) = pendingDefaultAdmin(); if (_msgSender() != newDefaultAdmin) { @@ -271,9 +250,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu /// AccessControlDefaultAdminRules public and internal setters for defaultAdminDelay/pendingDefaultAdminDelay /// - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function changeDefaultAdminDelay(uint48 newDelay) public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _changeDefaultAdminDelay(newDelay); } @@ -289,9 +266,7 @@ abstract contract AccessControlDefaultAdminRules is IAccessControlDefaultAdminRu emit DefaultAdminDelayChangeScheduled(newDelay, newSchedule); } - /** - * @inheritdoc IAccessControlDefaultAdminRules - */ + /// @inheritdoc IAccessControlDefaultAdminRules function rollbackDefaultAdminDelay() public virtual onlyRole(DEFAULT_ADMIN_ROLE) { _rollbackDefaultAdminDelay(); } diff --git a/contracts/access/extensions/AccessControlEnumerable.sol b/contracts/access/extensions/AccessControlEnumerable.sol index b1980e364..e8d54ead2 100644 --- a/contracts/access/extensions/AccessControlEnumerable.sol +++ b/contracts/access/extensions/AccessControlEnumerable.sol @@ -6,6 +6,7 @@ pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol"; import {AccessControl} from "../AccessControl.sol"; import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol"; +import {IERC165} from "../../utils/introspection/ERC165.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. @@ -15,9 +16,7 @@ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessCon mapping(bytes32 role => EnumerableSet.AddressSet) private _roleMembers; - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } diff --git a/contracts/governance/Governor.sol b/contracts/governance/Governor.sol index c0f7a8b48..9beb494df 100644 --- a/contracts/governance/Governor.sol +++ b/contracts/governance/Governor.sol @@ -86,9 +86,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 } } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IGovernor).interfaceId || @@ -97,16 +95,12 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 super.supportsInterface(interfaceId); } - /** - * @dev See {IGovernor-name}. - */ + /// @inheritdoc IGovernor function name() public view virtual returns (string memory) { return _name; } - /** - * @dev See {IGovernor-version}. - */ + /// @inheritdoc IGovernor function version() public view virtual returns (string memory) { return "1"; } @@ -133,9 +127,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); } - /** - * @dev See {IGovernor-getProposalId}. - */ + /// @inheritdoc IGovernor function getProposalId( address[] memory targets, uint256[] memory values, @@ -145,9 +137,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return hashProposal(targets, values, calldatas, descriptionHash); } - /** - * @dev See {IGovernor-state}. - */ + /// @inheritdoc IGovernor function state(uint256 proposalId) public view virtual returns (ProposalState) { // We read the struct fields into the stack at once so Solidity emits a single SLOAD ProposalCore storage proposal = _proposals[proposalId]; @@ -187,44 +177,32 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 } } - /** - * @dev See {IGovernor-proposalThreshold}. - */ + /// @inheritdoc IGovernor function proposalThreshold() public view virtual returns (uint256) { return 0; } - /** - * @dev See {IGovernor-proposalSnapshot}. - */ + /// @inheritdoc IGovernor function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256) { return _proposals[proposalId].voteStart; } - /** - * @dev See {IGovernor-proposalDeadline}. - */ + /// @inheritdoc IGovernor function proposalDeadline(uint256 proposalId) public view virtual returns (uint256) { return _proposals[proposalId].voteStart + _proposals[proposalId].voteDuration; } - /** - * @dev See {IGovernor-proposalProposer}. - */ + /// @inheritdoc IGovernor function proposalProposer(uint256 proposalId) public view virtual returns (address) { return _proposals[proposalId].proposer; } - /** - * @dev See {IGovernor-proposalEta}. - */ + /// @inheritdoc IGovernor function proposalEta(uint256 proposalId) public view virtual returns (uint256) { return _proposals[proposalId].etaSeconds; } - /** - * @dev See {IGovernor-proposalNeedsQueuing}. - */ + /// @inheritdoc IGovernor function proposalNeedsQueuing(uint256) public view virtual returns (bool) { return false; } @@ -362,9 +340,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 // Using a named return variable to avoid stack too deep errors } - /** - * @dev See {IGovernor-queue}. - */ + /// @inheritdoc IGovernor function queue( address[] memory targets, uint256[] memory values, @@ -410,9 +386,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return 0; } - /** - * @dev See {IGovernor-execute}. - */ + /// @inheritdoc IGovernor function execute( address[] memory targets, uint256[] memory values, @@ -470,9 +444,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 } } - /** - * @dev See {IGovernor-cancel}. - */ + /// @inheritdoc IGovernor function cancel( address[] memory targets, uint256[] memory values, @@ -518,16 +490,12 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return proposalId; } - /** - * @dev See {IGovernor-getVotes}. - */ + /// @inheritdoc IGovernor function getVotes(address account, uint256 timepoint) public view virtual returns (uint256) { return _getVotes(account, timepoint, _defaultParams()); } - /** - * @dev See {IGovernor-getVotesWithParams}. - */ + /// @inheritdoc IGovernor function getVotesWithParams( address account, uint256 timepoint, @@ -536,17 +504,13 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return _getVotes(account, timepoint, params); } - /** - * @dev See {IGovernor-castVote}. - */ + /// @inheritdoc IGovernor function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256) { address voter = _msgSender(); return _castVote(proposalId, voter, support, ""); } - /** - * @dev See {IGovernor-castVoteWithReason}. - */ + /// @inheritdoc IGovernor function castVoteWithReason( uint256 proposalId, uint8 support, @@ -556,9 +520,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return _castVote(proposalId, voter, support, reason); } - /** - * @dev See {IGovernor-castVoteWithReasonAndParams}. - */ + /// @inheritdoc IGovernor function castVoteWithReasonAndParams( uint256 proposalId, uint8 support, @@ -569,9 +531,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return _castVote(proposalId, voter, support, reason, params); } - /** - * @dev See {IGovernor-castVoteBySig}. - */ + /// @inheritdoc IGovernor function castVoteBySig( uint256 proposalId, uint8 support, @@ -591,9 +551,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return _castVote(proposalId, voter, support, ""); } - /** - * @dev See {IGovernor-castVoteWithReasonAndParamsBySig}. - */ + /// @inheritdoc IGovernor function castVoteWithReasonAndParamsBySig( uint256 proposalId, uint8 support, @@ -811,30 +769,20 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72 return (state(proposalId) == ProposalState.Pending) && caller == proposalProposer(proposalId); } - /** - * @inheritdoc IERC6372 - */ + /// @inheritdoc IERC6372 function clock() public view virtual returns (uint48); - /** - * @inheritdoc IERC6372 - */ + /// @inheritdoc IERC6372 // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() public view virtual returns (string memory); - /** - * @inheritdoc IGovernor - */ + /// @inheritdoc IGovernor function votingDelay() public view virtual returns (uint256); - /** - * @inheritdoc IGovernor - */ + /// @inheritdoc IGovernor function votingPeriod() public view virtual returns (uint256); - /** - * @inheritdoc IGovernor - */ + /// @inheritdoc IGovernor function quorum(uint256 timepoint) public view virtual returns (uint256); /** diff --git a/contracts/governance/TimelockController.sol b/contracts/governance/TimelockController.sol index b8e4bfae6..e608d393d 100644 --- a/contracts/governance/TimelockController.sol +++ b/contracts/governance/TimelockController.sol @@ -7,6 +7,7 @@ import {AccessControl} from "../access/AccessControl.sol"; import {ERC721Holder} from "../token/ERC721/utils/ERC721Holder.sol"; import {ERC1155Holder} from "../token/ERC1155/utils/ERC1155Holder.sol"; import {Address} from "../utils/Address.sol"; +import {IERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the @@ -154,9 +155,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder { */ receive() external payable virtual {} - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface( bytes4 interfaceId ) public view virtual override(AccessControl, ERC1155Holder) returns (bool) { diff --git a/contracts/governance/extensions/GovernorCountingFractional.sol b/contracts/governance/extensions/GovernorCountingFractional.sol index 2462227a0..039a4d88e 100644 --- a/contracts/governance/extensions/GovernorCountingFractional.sol +++ b/contracts/governance/extensions/GovernorCountingFractional.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; -import {Governor} from "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; import {GovernorCountingSimple} from "./GovernorCountingSimple.sol"; import {Math} from "../../utils/math/Math.sol"; @@ -53,17 +53,13 @@ abstract contract GovernorCountingFractional is Governor { */ error GovernorExceedRemainingWeight(address voter, uint256 usedVotes, uint256 remainingWeight); - /** - * @dev See {IGovernor-COUNTING_MODE}. - */ + /// @inheritdoc IGovernor // solhint-disable-next-line func-name-mixedcase function COUNTING_MODE() public pure virtual override returns (string memory) { return "support=bravo,fractional&quorum=for,abstain¶ms=fractional"; } - /** - * @dev See {IGovernor-hasVoted}. - */ + /// @inheritdoc IGovernor function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { return usedVotes(proposalId, account) > 0; } @@ -86,9 +82,7 @@ abstract contract GovernorCountingFractional is Governor { return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); } - /** - * @dev See {Governor-_quorumReached}. - */ + /// @inheritdoc Governor function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { ProposalVote storage proposalVote = _proposalVotes[proposalId]; return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes; diff --git a/contracts/governance/extensions/GovernorCountingOverridable.sol b/contracts/governance/extensions/GovernorCountingOverridable.sol index bc06de96d..ef8d34013 100644 --- a/contracts/governance/extensions/GovernorCountingOverridable.sol +++ b/contracts/governance/extensions/GovernorCountingOverridable.sol @@ -7,6 +7,7 @@ import {SignatureChecker} from "../../utils/cryptography/SignatureChecker.sol"; import {SafeCast} from "../../utils/math/SafeCast.sol"; import {VotesExtended} from "../utils/VotesExtended.sol"; import {GovernorVotes} from "./GovernorVotes.sol"; +import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} which enables delegators to override the vote of their delegates. This module requires a @@ -46,9 +47,7 @@ abstract contract GovernorCountingOverridable is GovernorVotes { mapping(uint256 proposalId => ProposalVote) private _proposalVotes; - /** - * @dev See {IGovernor-COUNTING_MODE}. - */ + /// @inheritdoc IGovernor // solhint-disable-next-line func-name-mixedcase function COUNTING_MODE() public pure virtual override returns (string memory) { return "support=bravo,override&quorum=for,abstain&overridable=true"; @@ -83,9 +82,7 @@ abstract contract GovernorCountingOverridable is GovernorVotes { return (votes[uint8(VoteType.Against)], votes[uint8(VoteType.For)], votes[uint8(VoteType.Abstain)]); } - /** - * @dev See {Governor-_quorumReached}. - */ + /// @inheritdoc Governor function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { uint256[3] storage votes = _proposalVotes[proposalId].votes; return quorum(proposalSnapshot(proposalId)) <= votes[uint8(VoteType.For)] + votes[uint8(VoteType.Abstain)]; diff --git a/contracts/governance/extensions/GovernorCountingSimple.sol b/contracts/governance/extensions/GovernorCountingSimple.sol index 0b89b2438..7d7a6a9af 100644 --- a/contracts/governance/extensions/GovernorCountingSimple.sol +++ b/contracts/governance/extensions/GovernorCountingSimple.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; -import {Governor} from "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} for simple, 3 options, vote counting. @@ -27,17 +27,13 @@ abstract contract GovernorCountingSimple is Governor { mapping(uint256 proposalId => ProposalVote) private _proposalVotes; - /** - * @dev See {IGovernor-COUNTING_MODE}. - */ + /// @inheritdoc IGovernor // solhint-disable-next-line func-name-mixedcase function COUNTING_MODE() public pure virtual override returns (string memory) { return "support=bravo&quorum=for,abstain"; } - /** - * @dev See {IGovernor-hasVoted}. - */ + /// @inheritdoc IGovernor function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { return _proposalVotes[proposalId].hasVoted[account]; } @@ -52,9 +48,7 @@ abstract contract GovernorCountingSimple is Governor { return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes); } - /** - * @dev See {Governor-_quorumReached}. - */ + /// @inheritdoc Governor function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { ProposalVote storage proposalVote = _proposalVotes[proposalId]; diff --git a/contracts/governance/extensions/GovernorSequentialProposalId.sol b/contracts/governance/extensions/GovernorSequentialProposalId.sol index 8cfa5aa46..b46e0f6ed 100644 --- a/contracts/governance/extensions/GovernorSequentialProposalId.sol +++ b/contracts/governance/extensions/GovernorSequentialProposalId.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; -import {Governor} from "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} that changes the numbering of proposal ids from the default hash-based approach to @@ -19,9 +19,7 @@ abstract contract GovernorSequentialProposalId is Governor { */ error GovernorAlreadyInitializedLatestProposalId(); - /** - * @dev See {IGovernor-getProposalId}. - */ + /// @inheritdoc IGovernor function getProposalId( address[] memory targets, uint256[] memory values, diff --git a/contracts/governance/extensions/GovernorSettings.sol b/contracts/governance/extensions/GovernorSettings.sol index 7347ee293..4c9b29308 100644 --- a/contracts/governance/extensions/GovernorSettings.sol +++ b/contracts/governance/extensions/GovernorSettings.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; -import {Governor} from "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; /** * @dev Extension of {Governor} for settings updatable through governance. @@ -29,23 +29,17 @@ abstract contract GovernorSettings is Governor { _setProposalThreshold(initialProposalThreshold); } - /** - * @dev See {IGovernor-votingDelay}. - */ + /// @inheritdoc IGovernor function votingDelay() public view virtual override returns (uint256) { return _votingDelay; } - /** - * @dev See {IGovernor-votingPeriod}. - */ + /// @inheritdoc IGovernor function votingPeriod() public view virtual override returns (uint256) { return _votingPeriod; } - /** - * @dev See {Governor-proposalThreshold}. - */ + /// @inheritdoc Governor function proposalThreshold() public view virtual override returns (uint256) { return _proposalThreshold; } diff --git a/contracts/governance/extensions/GovernorTimelockAccess.sol b/contracts/governance/extensions/GovernorTimelockAccess.sol index fad2510a1..dd95b1224 100644 --- a/contracts/governance/extensions/GovernorTimelockAccess.sol +++ b/contracts/governance/extensions/GovernorTimelockAccess.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.20; -import {Governor} from "../Governor.sol"; +import {IGovernor, Governor} from "../Governor.sol"; import {AuthorityUtils} from "../../access/manager/AuthorityUtils.sol"; import {IAccessManager} from "../../access/manager/IAccessManager.sol"; import {Address} from "../../utils/Address.sol"; @@ -171,16 +171,12 @@ abstract contract GovernorTimelockAccess is Governor { return (delay, indirect, withDelay); } - /** - * @dev See {IGovernor-proposalNeedsQueuing}. - */ + /// @inheritdoc IGovernor function proposalNeedsQueuing(uint256 proposalId) public view virtual override returns (bool) { return _executionPlan[proposalId].delay > 0; } - /** - * @dev See {IGovernor-propose} - */ + /// @inheritdoc IGovernor function propose( address[] memory targets, uint256[] memory values, @@ -279,9 +275,7 @@ abstract contract GovernorTimelockAccess is Governor { } } - /** - * @dev See {Governor-_cancel} - */ + /// @inheritdoc Governor function _cancel( address[] memory targets, uint256[] memory values, diff --git a/contracts/governance/extensions/GovernorTimelockCompound.sol b/contracts/governance/extensions/GovernorTimelockCompound.sol index e0f4f5571..ed5b5b489 100644 --- a/contracts/governance/extensions/GovernorTimelockCompound.sol +++ b/contracts/governance/extensions/GovernorTimelockCompound.sol @@ -53,9 +53,7 @@ abstract contract GovernorTimelockCompound is Governor { return address(_timelock); } - /** - * @dev See {IGovernor-proposalNeedsQueuing}. - */ + /// @inheritdoc IGovernor function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { return true; } diff --git a/contracts/governance/extensions/GovernorTimelockControl.sol b/contracts/governance/extensions/GovernorTimelockControl.sol index 02262cef7..5158fe958 100644 --- a/contracts/governance/extensions/GovernorTimelockControl.sol +++ b/contracts/governance/extensions/GovernorTimelockControl.sol @@ -67,9 +67,7 @@ abstract contract GovernorTimelockControl is Governor { return address(_timelock); } - /** - * @dev See {IGovernor-proposalNeedsQueuing}. - */ + /// @inheritdoc IGovernor function proposalNeedsQueuing(uint256) public view virtual override returns (bool) { return true; } diff --git a/contracts/token/ERC1155/ERC1155.sol b/contracts/token/ERC1155/ERC1155.sol index 3e0a91f8b..e7f1dab98 100644 --- a/contracts/token/ERC1155/ERC1155.sol +++ b/contracts/token/ERC1155/ERC1155.sol @@ -34,9 +34,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER _setURI(uri_); } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || @@ -58,9 +56,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER return _uri; } - /** - * @dev See {IERC1155-balanceOf}. - */ + /// @inheritdoc IERC1155 function balanceOf(address account, uint256 id) public view virtual returns (uint256) { return _balances[id][account]; } @@ -89,23 +85,17 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER return batchBalances; } - /** - * @dev See {IERC1155-setApprovalForAll}. - */ + /// @inheritdoc IERC1155 function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } - /** - * @dev See {IERC1155-isApprovedForAll}. - */ + /// @inheritdoc IERC1155 function isApprovedForAll(address account, address operator) public view virtual returns (bool) { return _operatorApprovals[account][operator]; } - /** - * @dev See {IERC1155-safeTransferFrom}. - */ + /// @inheritdoc IERC1155 function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { @@ -114,9 +104,7 @@ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IER _safeTransferFrom(from, to, id, value, data); } - /** - * @dev See {IERC1155-safeBatchTransferFrom}. - */ + /// @inheritdoc IERC1155 function safeBatchTransferFrom( address from, address to, diff --git a/contracts/token/ERC1155/extensions/ERC1155Supply.sol b/contracts/token/ERC1155/extensions/ERC1155Supply.sol index 00dd082a3..2ca206782 100644 --- a/contracts/token/ERC1155/extensions/ERC1155Supply.sol +++ b/contracts/token/ERC1155/extensions/ERC1155Supply.sol @@ -46,9 +46,7 @@ abstract contract ERC1155Supply is ERC1155 { return totalSupply(id) > 0; } - /** - * @dev See {ERC1155-_update}. - */ + /// @inheritdoc ERC1155 function _update( address from, address to, diff --git a/contracts/token/ERC1155/utils/ERC1155Holder.sol b/contracts/token/ERC1155/utils/ERC1155Holder.sol index 7ad5943ac..ff4681a52 100644 --- a/contracts/token/ERC1155/utils/ERC1155Holder.sol +++ b/contracts/token/ERC1155/utils/ERC1155Holder.sol @@ -13,9 +13,7 @@ import {IERC1155Receiver} from "../IERC1155Receiver.sol"; * stuck. */ abstract contract ERC1155Holder is ERC165, IERC1155Receiver { - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } diff --git a/contracts/token/ERC20/ERC20.sol b/contracts/token/ERC20/ERC20.sol index 13137bcf6..87da2fb04 100644 --- a/contracts/token/ERC20/ERC20.sol +++ b/contracts/token/ERC20/ERC20.sol @@ -78,16 +78,12 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { return 18; } - /** - * @dev See {IERC20-totalSupply}. - */ + /// @inheritdoc IERC20 function totalSupply() public view virtual returns (uint256) { return _totalSupply; } - /** - * @dev See {IERC20-balanceOf}. - */ + /// @inheritdoc IERC20 function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } @@ -106,9 +102,7 @@ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { return true; } - /** - * @dev See {IERC20-allowance}. - */ + /// @inheritdoc IERC20 function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } diff --git a/contracts/token/ERC20/extensions/ERC1363.sol b/contracts/token/ERC20/extensions/ERC1363.sol index 30ffd0f08..c76e454f0 100644 --- a/contracts/token/ERC20/extensions/ERC1363.sol +++ b/contracts/token/ERC20/extensions/ERC1363.sol @@ -39,9 +39,7 @@ abstract contract ERC1363 is ERC20, ERC165, IERC1363 { */ error ERC1363ApproveFailed(address spender, uint256 value); - /** - * @inheritdoc IERC165 - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1363).interfaceId || super.supportsInterface(interfaceId); } diff --git a/contracts/token/ERC20/extensions/ERC20Capped.sol b/contracts/token/ERC20/extensions/ERC20Capped.sol index 56bafb3ad..8370c6ce6 100644 --- a/contracts/token/ERC20/extensions/ERC20Capped.sol +++ b/contracts/token/ERC20/extensions/ERC20Capped.sol @@ -39,9 +39,7 @@ abstract contract ERC20Capped is ERC20 { return _cap; } - /** - * @dev See {ERC20-_update}. - */ + /// @inheritdoc ERC20 function _update(address from, address to, uint256 value) internal virtual override { super._update(from, to, value); diff --git a/contracts/token/ERC20/extensions/ERC20Permit.sol b/contracts/token/ERC20/extensions/ERC20Permit.sol index 3d36561a8..d59319196 100644 --- a/contracts/token/ERC20/extensions/ERC20Permit.sol +++ b/contracts/token/ERC20/extensions/ERC20Permit.sol @@ -38,9 +38,7 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { */ constructor(string memory name) EIP712(name, "1") {} - /** - * @inheritdoc IERC20Permit - */ + /// @inheritdoc IERC20Permit function permit( address owner, address spender, @@ -66,16 +64,12 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { _approve(owner, spender, value); } - /** - * @inheritdoc IERC20Permit - */ + /// @inheritdoc IERC20Permit function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } - /** - * @inheritdoc IERC20Permit - */ + /// @inheritdoc IERC20Permit // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); diff --git a/contracts/token/ERC20/extensions/ERC20Wrapper.sol b/contracts/token/ERC20/extensions/ERC20Wrapper.sol index 9cc5aaf5f..d4b0fe8e8 100644 --- a/contracts/token/ERC20/extensions/ERC20Wrapper.sol +++ b/contracts/token/ERC20/extensions/ERC20Wrapper.sol @@ -33,9 +33,7 @@ abstract contract ERC20Wrapper is ERC20 { _underlying = underlyingToken; } - /** - * @dev See {ERC20-decimals}. - */ + /// @inheritdoc IERC20Metadata function decimals() public view virtual override returns (uint8) { try IERC20Metadata(address(_underlying)).decimals() returns (uint8 value) { return value; diff --git a/contracts/token/ERC20/extensions/ERC4626.sol b/contracts/token/ERC20/extensions/ERC4626.sol index 2dc89e988..6e6a57c30 100644 --- a/contracts/token/ERC20/extensions/ERC4626.sol +++ b/contracts/token/ERC20/extensions/ERC4626.sol @@ -107,67 +107,67 @@ abstract contract ERC4626 is ERC20, IERC4626 { return _underlyingDecimals + _decimalsOffset(); } - /** @dev See {IERC4626-asset}. */ + /// @inheritdoc IERC4626 function asset() public view virtual returns (address) { return address(_asset); } - /** @dev See {IERC4626-totalAssets}. */ + /// @inheritdoc IERC4626 function totalAssets() public view virtual returns (uint256) { return IERC20(asset()).balanceOf(address(this)); } - /** @dev See {IERC4626-convertToShares}. */ + /// @inheritdoc IERC4626 function convertToShares(uint256 assets) public view virtual returns (uint256) { return _convertToShares(assets, Math.Rounding.Floor); } - /** @dev See {IERC4626-convertToAssets}. */ + /// @inheritdoc IERC4626 function convertToAssets(uint256 shares) public view virtual returns (uint256) { return _convertToAssets(shares, Math.Rounding.Floor); } - /** @dev See {IERC4626-maxDeposit}. */ + /// @inheritdoc IERC4626 function maxDeposit(address) public view virtual returns (uint256) { return type(uint256).max; } - /** @dev See {IERC4626-maxMint}. */ + /// @inheritdoc IERC4626 function maxMint(address) public view virtual returns (uint256) { return type(uint256).max; } - /** @dev See {IERC4626-maxWithdraw}. */ + /// @inheritdoc IERC4626 function maxWithdraw(address owner) public view virtual returns (uint256) { return _convertToAssets(balanceOf(owner), Math.Rounding.Floor); } - /** @dev See {IERC4626-maxRedeem}. */ + /// @inheritdoc IERC4626 function maxRedeem(address owner) public view virtual returns (uint256) { return balanceOf(owner); } - /** @dev See {IERC4626-previewDeposit}. */ + /// @inheritdoc IERC4626 function previewDeposit(uint256 assets) public view virtual returns (uint256) { return _convertToShares(assets, Math.Rounding.Floor); } - /** @dev See {IERC4626-previewMint}. */ + /// @inheritdoc IERC4626 function previewMint(uint256 shares) public view virtual returns (uint256) { return _convertToAssets(shares, Math.Rounding.Ceil); } - /** @dev See {IERC4626-previewWithdraw}. */ + /// @inheritdoc IERC4626 function previewWithdraw(uint256 assets) public view virtual returns (uint256) { return _convertToShares(assets, Math.Rounding.Ceil); } - /** @dev See {IERC4626-previewRedeem}. */ + /// @inheritdoc IERC4626 function previewRedeem(uint256 shares) public view virtual returns (uint256) { return _convertToAssets(shares, Math.Rounding.Floor); } - /** @dev See {IERC4626-deposit}. */ + /// @inheritdoc IERC4626 function deposit(uint256 assets, address receiver) public virtual returns (uint256) { uint256 maxAssets = maxDeposit(receiver); if (assets > maxAssets) { @@ -180,7 +180,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { return shares; } - /** @dev See {IERC4626-mint}. */ + /// @inheritdoc IERC4626 function mint(uint256 shares, address receiver) public virtual returns (uint256) { uint256 maxShares = maxMint(receiver); if (shares > maxShares) { @@ -193,7 +193,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { return assets; } - /** @dev See {IERC4626-withdraw}. */ + /// @inheritdoc IERC4626 function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) { uint256 maxAssets = maxWithdraw(owner); if (assets > maxAssets) { @@ -206,7 +206,7 @@ abstract contract ERC4626 is ERC20, IERC4626 { return shares; } - /** @dev See {IERC4626-redeem}. */ + /// @inheritdoc IERC4626 function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) { uint256 maxShares = maxRedeem(owner); if (shares > maxShares) { diff --git a/contracts/token/ERC721/ERC721.sol b/contracts/token/ERC721/ERC721.sol index 6aebc3730..a757e9b05 100644 --- a/contracts/token/ERC721/ERC721.sol +++ b/contracts/token/ERC721/ERC721.sol @@ -41,9 +41,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er _symbol = symbol_; } - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || @@ -51,9 +49,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er super.supportsInterface(interfaceId); } - /** - * @dev See {IERC721-balanceOf}. - */ + /// @inheritdoc IERC721 function balanceOf(address owner) public view virtual returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); @@ -61,30 +57,22 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er return _balances[owner]; } - /** - * @dev See {IERC721-ownerOf}. - */ + /// @inheritdoc IERC721 function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } - /** - * @dev See {IERC721Metadata-name}. - */ + /// @inheritdoc IERC721Metadata function name() public view virtual returns (string memory) { return _name; } - /** - * @dev See {IERC721Metadata-symbol}. - */ + /// @inheritdoc IERC721Metadata function symbol() public view virtual returns (string memory) { return _symbol; } - /** - * @dev See {IERC721Metadata-tokenURI}. - */ + /// @inheritdoc IERC721Metadata function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); @@ -101,39 +89,29 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er return ""; } - /** - * @dev See {IERC721-approve}. - */ + /// @inheritdoc IERC721 function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } - /** - * @dev See {IERC721-getApproved}. - */ + /// @inheritdoc IERC721 function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } - /** - * @dev See {IERC721-setApprovalForAll}. - */ + /// @inheritdoc IERC721 function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } - /** - * @dev See {IERC721-isApprovedForAll}. - */ + /// @inheritdoc IERC721 function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } - /** - * @dev See {IERC721-transferFrom}. - */ + /// @inheritdoc IERC721 function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); @@ -146,16 +124,12 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er } } - /** - * @dev See {IERC721-safeTransferFrom}. - */ + /// @inheritdoc IERC721 function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } - /** - * @dev See {IERC721-safeTransferFrom}. - */ + /// @inheritdoc IERC721 function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); ERC721Utils.checkOnERC721Received(_msgSender(), from, to, tokenId, data); diff --git a/contracts/token/ERC721/extensions/ERC721Enumerable.sol b/contracts/token/ERC721/extensions/ERC721Enumerable.sol index 43aa81e6e..6d699429d 100644 --- a/contracts/token/ERC721/extensions/ERC721Enumerable.sol +++ b/contracts/token/ERC721/extensions/ERC721Enumerable.sol @@ -33,16 +33,12 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { */ error ERC721EnumerableForbiddenBatchMint(); - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } - /** - * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. - */ + /// @inheritdoc IERC721Enumerable function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256) { if (index >= balanceOf(owner)) { revert ERC721OutOfBoundsIndex(owner, index); @@ -50,16 +46,12 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { return _ownedTokens[owner][index]; } - /** - * @dev See {IERC721Enumerable-totalSupply}. - */ + /// @inheritdoc IERC721Enumerable function totalSupply() public view virtual returns (uint256) { return _allTokens.length; } - /** - * @dev See {IERC721Enumerable-tokenByIndex}. - */ + /// @inheritdoc IERC721Enumerable function tokenByIndex(uint256 index) public view virtual returns (uint256) { if (index >= totalSupply()) { revert ERC721OutOfBoundsIndex(address(0), index); @@ -67,9 +59,7 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { return _allTokens[index]; } - /** - * @dev See {ERC721-_update}. - */ + /// @inheritdoc ERC721 function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { address previousOwner = super._update(to, tokenId, auth); diff --git a/contracts/token/ERC721/extensions/ERC721Royalty.sol b/contracts/token/ERC721/extensions/ERC721Royalty.sol index cfce1786c..c3b9dd627 100644 --- a/contracts/token/ERC721/extensions/ERC721Royalty.sol +++ b/contracts/token/ERC721/extensions/ERC721Royalty.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; +import {IERC165} from "../../../utils/introspection/ERC165.sol"; import {ERC2981} from "../../common/ERC2981.sol"; /** @@ -18,9 +19,7 @@ import {ERC2981} from "../../common/ERC2981.sol"; * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. */ abstract contract ERC721Royalty is ERC2981, ERC721 { - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } diff --git a/contracts/token/ERC721/extensions/ERC721URIStorage.sol b/contracts/token/ERC721/extensions/ERC721URIStorage.sol index bbb0d4c53..432fec71d 100644 --- a/contracts/token/ERC721/extensions/ERC721URIStorage.sol +++ b/contracts/token/ERC721/extensions/ERC721URIStorage.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; +import {IERC721Metadata} from "./IERC721Metadata.sol"; import {Strings} from "../../../utils/Strings.sol"; import {IERC4906} from "../../../interfaces/IERC4906.sol"; import {IERC165} from "../../../interfaces/IERC165.sol"; @@ -21,16 +22,12 @@ abstract contract ERC721URIStorage is IERC4906, ERC721 { // Optional mapping for token URIs mapping(uint256 tokenId => string) private _tokenURIs; - /** - * @dev See {IERC165-supportsInterface} - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { return interfaceId == ERC4906_INTERFACE_ID || super.supportsInterface(interfaceId); } - /** - * @dev See {IERC721Metadata-tokenURI}. - */ + /// @inheritdoc IERC721Metadata function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireOwned(tokenId); diff --git a/contracts/token/common/ERC2981.sol b/contracts/token/common/ERC2981.sol index 9c25e9b37..2c2f0446c 100644 --- a/contracts/token/common/ERC2981.sol +++ b/contracts/token/common/ERC2981.sol @@ -48,16 +48,12 @@ abstract contract ERC2981 is IERC2981, ERC165 { */ error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver); - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } - /** - * @inheritdoc IERC2981 - */ + /// @inheritdoc IERC2981 function royaltyInfo( uint256 tokenId, uint256 salePrice diff --git a/contracts/utils/cryptography/EIP712.sol b/contracts/utils/cryptography/EIP712.sol index 8ac545a8f..c39954e35 100644 --- a/contracts/utils/cryptography/EIP712.sol +++ b/contracts/utils/cryptography/EIP712.sol @@ -110,9 +110,7 @@ abstract contract EIP712 is IERC5267 { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } - /** - * @inheritdoc IERC5267 - */ + /// @inheritdoc IERC5267 function eip712Domain() public view diff --git a/contracts/utils/introspection/ERC165.sol b/contracts/utils/introspection/ERC165.sol index 9fbce0447..b21f7e9bd 100644 --- a/contracts/utils/introspection/ERC165.sol +++ b/contracts/utils/introspection/ERC165.sol @@ -18,9 +18,7 @@ import {IERC165} from "./IERC165.sol"; * ``` */ abstract contract ERC165 is IERC165 { - /** - * @dev See {IERC165-supportsInterface}. - */ + /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; }