Studio 721 is a free tool for configuring, compiling, deploying, and verifying custom ERC 721 NFT smart contracts. Studio 721 doesn't host your assets or metadata; use your favorite hosting service and link it to your NFT via "Token URI". Not sure where to start? There's a video walkthrough!Created by @dvnabbott
Preview of Token
Name
Abbreviation
Supply
Price
Royalties
Token URI
Contract URI

Minting Options

Preset
Reduce deployment costs
Multimint
Minting limit per wallet
Mint specific ids
Require access token
Only the owner can mint
Enumerable
Minting starts active
Approval Proxy
Mainnet address
Rinkeby address
Ropsten address
Polygon address
Mumbai address
Set token URIs individually

Token Parameters

Payout

Share
Recipient Address

Allowlist

Amount
Allowed Address

Contract Verification

Etherscan API Key
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract Cartire is ERC721, ReentrancyGuard, Ownable {
using Counters for Counters.Counter;
constructor(string memory customBaseURI_, address proxyRegistryAddress_)
ERC721("Cartire", "C")
{
customBaseURI = customBaseURI_;
proxyRegistryAddress = proxyRegistryAddress_;
}
/** MINTING **/
uint256 public constant MAX_MULTIMINT = 100;
Counters.Counter private supplyCounter;
function mint(uint256 count) public nonReentrant onlyOwner {
require(saleIsActive, "Sale not active");
require(count <= MAX_MULTIMINT, "Mint at most 100 at a time");
for (uint256 i = 0; i < count; i++) {
_mint(msg.sender, totalSupply());
supplyCounter.increment();
}
}
function totalSupply() public view returns (uint256) {
return supplyCounter.current();
}
/** ACTIVATION **/
bool public saleIsActive = true;
function setSaleIsActive(bool saleIsActive_) external onlyOwner {
saleIsActive = saleIsActive_;
}
/** URI HANDLING **/
string private customBaseURI;
mapping(uint256 => string) private tokenURIMap;
function setTokenURI(uint256 tokenId, string memory tokenURI_)
external
onlyOwner
{
tokenURIMap[tokenId] = tokenURI_;
}
function setBaseURI(string memory customBaseURI_) external onlyOwner {
customBaseURI = customBaseURI_;
}
function _baseURI() internal view virtual override returns (string memory) {
return customBaseURI;
}
function tokenURI(uint256 tokenId) public view override
returns (string memory)
{
string memory tokenURI_ = tokenURIMap[tokenId];
if (bytes(tokenURI_).length > 0) {
return tokenURI_;
}
return _baseURI();
}
/** PROXY REGISTRY **/
address private immutable proxyRegistryAddress;
function isApprovedForAll(address owner, address operator)
override
public
view
returns (bool)
{
ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);
if (address(proxyRegistry.proxies(owner)) == operator) {
return true;
}
return super.isApprovedForAll(owner, operator);
}
}
// Contract created with Studio 721 v1.5.0
// https://721.so