Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Wolf <[email protected]>
  • Loading branch information
wolfy-nft committed Dec 18, 2024
1 parent d927b09 commit f06f41c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ abstract contract ERC721ACQueryableInitializable is
}

/// @notice Overrides behavior of supportsInterface such that the contract implements the ICreatorToken interface.
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721ACloneable, IERC721A) returns (bool) {
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721ACloneable, IERC721A)
returns (bool)
{
return interfaceId == type(ICreatorToken).interfaceId || interfaceId == type(ICreatorTokenLegacy).interfaceId
|| super.supportsInterface(interfaceId);
}
Expand All @@ -39,13 +45,7 @@ abstract contract ERC721ACQueryableInitializable is

/// @notice Overrides behavior of isApprovedFor all such that if an operator is not explicitly approved
/// @notice for all, the contract owner can optionally auto-approve the 721-C transfer validator for transfers.
function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool isApproved)
{
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool isApproved) {
isApproved = super.isApprovedForAll(owner, operator);

if (!isApproved) {
Expand Down
5 changes: 1 addition & 4 deletions contracts/nft/erc721m/ERC721CMInitializableV1_0_1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ contract ERC721CMInitializableV1_0_1 is
/// @param name The name of the token collection
/// @param symbol The symbol of the token collection
/// @param initialOwner The address of the initial owner
function initialize(string calldata name, string calldata symbol, address initialOwner)
external
initializer
{
function initialize(string calldata name, string calldata symbol, address initialOwner) external initializer {
if (initialOwner == address(0)) {
revert InitialOwnerCannotBeZero();
}
Expand Down
16 changes: 5 additions & 11 deletions contracts/nft/erc721m/ERC721MInitializableV1_0_1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {Ownable} from "solady/src/auth/Ownable.sol";
import {ReentrancyGuard} from "solady/src/utils/ReentrancyGuard.sol";
import {SafeTransferLib} from "solady/src/utils/SafeTransferLib.sol";

import {IERC721A, ERC721A, ERC721AQueryable, IERC721AQueryable} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {
IERC721A, ERC721A, ERC721AQueryable, IERC721AQueryable
} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {ERC721AConduitPreapprovedCloneable} from "contracts/nft/erc721m/clones/ERC721AConduitPreapprovedCloneable.sol";
import {ERC721ACloneable} from "contracts/nft/erc721m/clones/ERC721ACloneable.sol";

Expand Down Expand Up @@ -45,10 +47,7 @@ contract ERC721MInitializableV1_0_1 is
/// @param name The name of the token collection
/// @param symbol The symbol of the token collection
/// @param initialOwner The address of the initial owner
function initialize(string calldata name, string calldata symbol, address initialOwner)
external
initializer
{
function initialize(string calldata name, string calldata symbol, address initialOwner) external initializer {
if (initialOwner == address(0)) {
revert InitialOwnerCannotBeZero();
}
Expand All @@ -70,12 +69,7 @@ contract ERC721MInitializableV1_0_1 is
/// @notice Gets the token URI for a specific token ID
/// @param tokenId The ID of the token
/// @return The token URI
function tokenURI(uint256 tokenId)
public
view
override(ERC721ACloneable, IERC721A)
returns (string memory)
{
function tokenURI(uint256 tokenId) public view override(ERC721ACloneable, IERC721A) returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

string memory baseURI = _currentBaseURI;
Expand Down

0 comments on commit f06f41c

Please sign in to comment.