This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function adopt(uint256 amount) public payable { | |
| require(amount < 4, "You can adopt a maximum of 3 Paper Cats"); | |
| require(!_paused, "Sale paused"); | |
| require(msg.value == _price * amount, "Ether sent is not correct"); | |
| for (uint256 i; i < amount; i++) { | |
| _safeMint(msg.sender, totalSupply()); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.0; | |
| import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; | |
| import '@openzeppelin/contracts/access/Ownable.sol'; | |
| contract PaperCats is ERC721Enumerable, Ownable { | |
| string _baseTokenURI; | |
| bool public _paused = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const config: HardhatUserConfig = { | |
| defaultNetwork: "hardhat", | |
| solidity: { | |
| compilers: [{ version: "0.8.0", settings: {} }], | |
| }, | |
| networks: { | |
| hardhat: {}, | |
| localhost: {}, | |
| rinkeby: { | |
| url: `https://rinkeby.infura.io/v3/${INFURA_API_KEY}`, |
OlderNewer