Add Prettier for linting and fix Solhint config (#2697)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -27,8 +27,7 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
|
||||
* @dev See {IERC165-supportsInterface}.
|
||||
*/
|
||||
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
|
||||
return interfaceId == type(IERC721Enumerable).interfaceId
|
||||
|| super.supportsInterface(interfaceId);
|
||||
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -69,7 +68,11 @@ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
|
||||
*
|
||||
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
|
||||
*/
|
||||
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
|
||||
function _beforeTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
) internal virtual override {
|
||||
super._beforeTokenTransfer(from, to, tokenId);
|
||||
|
||||
if (from == address(0)) {
|
||||
|
||||
@ -20,7 +20,11 @@ abstract contract ERC721Pausable is ERC721, Pausable {
|
||||
*
|
||||
* - the contract must not be paused.
|
||||
*/
|
||||
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
|
||||
function _beforeTokenTransfer(
|
||||
address from,
|
||||
address to,
|
||||
uint256 tokenId
|
||||
) internal virtual override {
|
||||
super._beforeTokenTransfer(from, to, tokenId);
|
||||
|
||||
require(!paused(), "ERC721Pausable: token transfer while paused");
|
||||
|
||||
@ -11,7 +11,7 @@ abstract contract ERC721URIStorage is ERC721 {
|
||||
using Strings for uint256;
|
||||
|
||||
// Optional mapping for token URIs
|
||||
mapping (uint256 => string) private _tokenURIs;
|
||||
mapping(uint256 => string) private _tokenURIs;
|
||||
|
||||
/**
|
||||
* @dev See {IERC721Metadata-tokenURI}.
|
||||
|
||||
@ -9,7 +9,6 @@ import "../IERC721.sol";
|
||||
* @dev See https://eips.ethereum.org/EIPS/eip-721
|
||||
*/
|
||||
interface IERC721Enumerable is IERC721 {
|
||||
|
||||
/**
|
||||
* @dev Returns the total amount of tokens stored by the contract.
|
||||
*/
|
||||
|
||||
@ -9,7 +9,6 @@ import "../IERC721.sol";
|
||||
* @dev See https://eips.ethereum.org/EIPS/eip-721
|
||||
*/
|
||||
interface IERC721Metadata is IERC721 {
|
||||
|
||||
/**
|
||||
* @dev Returns the token collection name.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user