{ "language": "Solidity", "sources": { "/contracts/CommonNft.sol": { "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';\nimport '@openzeppelin/contracts/utils/Address.sol';\nimport \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport \"./ERC721A/contracts/extensions/ERC721AQueryable.sol\";\n\ncontract CommonNft is ERC721AQueryable, Ownable, ReentrancyGuard {\n string private _uri;\n uint256 private maxTotalSupply = 10000;\n\n constructor(string memory _tokenName,string memory _tokenSymbol, uint256 tokenSupply) ERC721A(_tokenName, _tokenSymbol) {\n maxTotalSupply = tokenSupply;\n }\n event PaymentReleased(address to, uint256 amount);\n\n function _baseURI() internal view override(ERC721A) returns (string memory) {\n return _uri;\n }\n\n function setURI(string memory _newUri) public virtual onlyOwner {\n _uri = _newUri;\n }\n\n function mint(uint256 amount) external payable {\n require(totalSupply()+amount<=maxTotalSupply, \"reach max supply\");\n require(_numberMinted(msg.sender)+amount<=10, \"reach max mint\");\n _safeMint(msg.sender, amount);\n }\n\n function mintTo(uint256 amount, address toAddress) external payable {\n require(totalSupply()+amount<=maxTotalSupply, \"reach max supply\");\n require(_numberMinted(toAddress)+amount<=10, \"reach max mint\");\n _safeMint(toAddress, amount);\n }\n\n function withdraw() public virtual nonReentrant onlyOwner {\n require(address(this).balance > 0, \"SUM005\");\n Address.sendValue(payable(owner()), address(this).balance);\n emit PaymentReleased(owner(), address(this).balance);\n }\n}" }, "/contracts/ERC721A/contracts/extensions/IERC721AQueryable.sol": { "content": "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.2\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport '../IERC721A.sol';\n\n/**\n * @dev Interface of ERC721AQueryable.\n */\ninterface IERC721AQueryable is IERC721A {\n /**\n * Invalid query range (`start` >= `stop`).\n */\n error InvalidQueryRange();\n\n /**\n * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n *\n * If the `tokenId` is out of bounds:\n *\n * - `addr = address(0)`\n * - `startTimestamp = 0`\n * - `burned = false`\n * - `extraData = 0`\n *\n * If the `tokenId` is burned:\n *\n * - `addr =
`\n * - `startTimestamp =