Skip to content

Instantly share code, notes, and snippets.

@dexXxed
Created June 23, 2022 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dexXxed/d9c46457c3121ba83ea1f748ce3ac278 to your computer and use it in GitHub Desktop.
Save dexXxed/d9c46457c3121ba83ea1f748ce3ac278 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract War_Is_Not_Over is ERC721A, Ownable {
string private baseURI = "ipfs://QmcGUKj6339Xi5hSzy9NUtrcCvYftHNQ7uoeJvSMPJLc3Q/";
constructor() ERC721A("War Is Not Over", "War_Is_Not_Over") {
_safeMint(msg.sender, 130);
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
return string(abi.encodePacked(baseURI, Strings.toString(tokenId + 1), ".json"));
}
function setNewBaseURI(string memory _newbaseURI) public onlyOwner {
baseURI = _newbaseURI;
}
function mintQuantity(uint256 _quantity) public onlyOwner {
_safeMint(msg.sender, _quantity);
}
}
@dexXxed
Copy link
Author

dexXxed commented Jun 28, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment