Skip to content

Commit

Permalink
fix: remove underscore and useless _requireOwned
Browse files Browse the repository at this point in the history
  • Loading branch information
huyhuynh3103 committed Dec 29, 2024
1 parent 37b6069 commit f5db390
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 74 deletions.
19 changes: 10 additions & 9 deletions src/ERC721Common.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import { ERC721Nonce } from "./refs/ERC721Nonce.sol";
import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol";

contract ERC721Common is ERC721Nonce, ERC721PresetMinterPauserAutoIdCustomized, IERC721State, IERC721Common {
constructor(string memory name, string memory symbol, string memory baseTokenURI)
ERC721PresetMinterPauserAutoIdCustomized(name, symbol, baseTokenURI)
{ }
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI
) ERC721PresetMinterPauserAutoIdCustomized(name, symbol, baseTokenURI) { }

/// @inheritdoc IERC721State
function stateOf(
uint256 tokenId
) external view virtual override returns (bytes memory) {
_requireOwned(tokenId);
return abi.encodePacked(ownerOf(tokenId), nonces[tokenId], tokenId);
}

Expand Down Expand Up @@ -76,13 +77,13 @@ contract ERC721Common is ERC721Nonce, ERC721PresetMinterPauserAutoIdCustomized,
* - the caller must have the `MINTER_ROLE`.
*/
function bulkMint(
address[] calldata _recipients
address[] calldata recipients
) external virtual onlyRole(MINTER_ROLE) returns (uint256[] memory tokenIds) {
require(_recipients.length > 0, "ERC721Common: invalid array lengths");
tokenIds = new uint256[](_recipients.length);
require(recipients.length > 0, "ERC721Common: invalid array lengths");
tokenIds = new uint256[](recipients.length);

for (uint256 _i = 0; _i < _recipients.length; _i++) {
tokenIds[_i] = _mintFor(_recipients[_i]);
for (uint256 i; i < recipients.length; i++) {
tokenIds[i] = _mintFor(recipients[i]);
}
}
}
34 changes: 0 additions & 34 deletions test/foundry/SampleNFT1155Launchpad.t.sol

This file was deleted.

31 changes: 0 additions & 31 deletions test/foundry/SampleNFT721Launchpad.t.sol

This file was deleted.

0 comments on commit f5db390

Please sign in to comment.