Contract detail
PepeArt
Live Robinhood Chain account facts for 0xfe8cbcd0…02c0f5da with at least 509 observed transactions. The history total is updating as indexing continues.
- Address type
- Smart contract
- Transactions
- 509+ observed
- First indexed block
- #87169435
- Latest indexed block
- #113230792
- History coverage
- Recent activity available; total is catching up
- Funding transaction
- 0x3e907916…f8fe56ac in block #87510941
- Emitted events
- 1509
- Token tracker
- Pepe Art (PEPEART)
- Verification
- Verified
- Compiler
- 0.8.34+commit.80d5c536
- Verification match
- exact
- Creation transaction
- 0x8a046ac4…e5d42941
- Created at block
- #87169435
- Language
- Solidity
- License
- MIT
- Compiler optimization
- Disabled
- Deployed bytecode hash
- 0x7dadcfbfb1c40d9f382af8cacce219614cf0fa6441c8cd7f7de9cc8fca2e05b8
Related activity
Transactions
Verified contract
Contract source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
contract PepeArt is ERC721, Ownable, ReentrancyGuard {
IERC20 public memeToken;
uint256 public maxSupply;
uint256 public mintPrice;
uint256 public minHoldAmount;
uint256 public maxPerWallet;
uint256 private _nextTokenId = 1;
string private _baseTokenURI;
bool public mintEnabled;
mapping(address => uint256) public minted;
event Minted(address indexed to, uint256 quantity);
constructor(
string memory name_,
string memory symbol_,
string memory baseURI_,
uint256 maxSupply_,
address memeToken_,
uint256 minHoldAmount_,
uint256 mintPrice_,
uint256 maxPerWallet_
) ERC721(name_, symbol_) Ownable(msg.sender) {
_baseTokenURI = baseURI_;
maxSupply = maxSupply_;
memeToken = IERC20(memeToken_);
minHoldAmount = minHoldAmount_;
mintPrice = mintPrice_;
maxPerWallet = maxPerWallet_;
mintEnabled = false; // start paused
}
function mint(uint256 quantity) external payable nonReentrant {
require(mintEnabled, "Mint not enabled");
require(quantity > 0, "Quantity must be > 0");
require(_nextTokenId + quantity - 1 <= maxSupply, "Exceeds max supply");
require(minted[msg.sender] + quantity <= maxPerWallet, "Exceeds max per wallet");
// Holder check
if (minHoldAmount > 0) {
require(
memeToken.balanceOf(msg.sender) >= minHoldAmount,
"Must hold minimum meme coin amount"
);
}
// Payment check
if (mintPrice > 0) {
require(msg.value >= mintPrice * quantity, "Insufficient ETH");
}
for (uint256 i = 0; i < quantity; i++) {
_safeMint(msg.sender, _nextTokenId);
_nextTokenId++;
}
minted[msg.sender] += quantity;
emit Minted(msg.sender, quantity);
}
// --- Owner functions ---
function setMintEnabled(bool enabled) external onlyOwner {
mintEnabled = enabled;
}
function setMemeToken(address newToken) external onlyOwner {
memeToken = IERC20(newToken);
}
function setMinHoldAmount(uint256 amount) external onlyOwner {
minHoldAmount = amount;
}
function setMintPrice(uint256 price) external onlyOwner {
mintPrice = price;
}
function setMaxPerWallet(uint256 max) external onlyOwner {
maxPerWallet = max;
}
function setBaseURI(string memory newBaseURI) external onlyOwner {
_baseTokenURI = newBaseURI;
}
function withdraw() external onlyOwner {
uint256 balance = address(this).balance;
require(balance > 0, "No balance to withdraw");
(bool success, ) = payable(owner()).call{value: balance}("");
require(success, "Withdraw failed");
}
function totalSupply() external view returns (uint256) {
return _nextTokenId - 1;
}
function _baseURI() internal view override returns (string memory) {
return _baseTokenURI;
}
}