Skip to content

Instantly share code, notes, and snippets.

@grampabacon
Last active September 28, 2021 16:45
Show Gist options
  • Save grampabacon/41c94918020fb18df3f1b54a7bed687b to your computer and use it in GitHub Desktop.
Save grampabacon/41c94918020fb18df3f1b54a7bed687b to your computer and use it in GitHub Desktop.
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());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment