R0b1nPunkzAC
0x7a0f251613c6bfac81fc9a37a2208d5114f731bc
Verification
Verified
v0.8.24+commit.e11b9ed9
Type
Contract
16,953 bytes
ABI entries
124
46 read · 26 write
License
none
Contract information
- Address
- 0x7a0f251613c6bfac81fc9a37a2208d5114f731bc
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.24+commit.e11b9ed9
- Optimization
- Enabled
- Creator
- 0x5b5497c0B4…92BcC87d4F
- Creation tx
- 0x4b6a324980…fb15dfe7e2
Token
- Name
- R0b!nPunkz
- Symbol
- R0BPNKZ
- Decimals
- —
- Holders
- 487
- Market
- View token page →
Read contract (46)
DEFAULT_TRANSFER_VALIDATOR() → address
TICKET_TYPEHASH() → bytes32
TOTAL_SUPPLY() → uint256
autoApproveTransfersFromValidator() → bool
balanceOf(address) → uint256
contractURI() → string
costFor(uint256) → uint256
directMintActive() → bool
directPrice() → uint256
eip712Domain() → bytes1, string, string, uint256, address, bytes32, uint256[]
ethUsdRate() → uint256
explicitOwnershipOf(uint256) → tuple
explicitOwnershipsOf(uint256[]) → tuple[]
freeMintCap() → uint256
freeMinted() → uint256
getApproved(uint256) → address
getTransferValidationFunction() → bytes4, bool
getTransferValidator() → address
isApprovedForAll(address, address) → bool
lastMintAt(address) → uint256
maxMintsPerWallet() → uint256
maxQtyPerTx() → uint256
mintCooldown() → uint256
mintedPerWallet(address) → uint256
name() → string
nextTokenId() → uint256
owner() → address
ownerOf(uint256) → address
pendingRefunds(address) → uint256
priceBps() → uint256
pricePerMint() → uint256
renderer() → address
royaltyInfo(uint256, uint256) → address, uint256
saleActive() → bool
supportsInterface(bytes4) → bool
symbol() → string
ticketDigest(address, uint256, uint256, uint256, uint256) → bytes32
ticketSigner() → address
ticketUsed(bytes32) → bool
tokenURI(uint256) → string
tokensOfOwner(address) → uint256[]
tokensOfOwnerIn(address, uint256, uint256) → uint256[]
totalMinted() → uint256
totalPendingRefunds() → uint256
totalSupply() → uint256
totalSupplyCirculating() → uint256
Events (16)
ApprovalApprovalForAllAutomaticApprovalOfTransferValidatorSetBatchMetadataUpdateConsecutiveTransferEIP712DomainChangedMetadataUpdateMintedOwnershipTransferredRefundClaimedRefundCreditedRendererUpdatedSaleActiveUpdatedTicketSignerUpdatedTransferTransferValidatorUpdated
ABI
[
{
"inputs": [
{
"internalType": "address",
"name": "initialTicketSigner",
"type": "address"
},
{
"internalType": "uint256",
"name": "initialEthUsdRate",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ApprovalCallerNotOwnerNorApproved",
"type": "error"
},
{
"inputs": [],
"name": "ApprovalQueryForNonexistentToken",
"type": "error"
},
{
"inputs": [],
"name": "BalanceQueryForZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "CreatorTokenBase__InvalidTransferValidatorContract",
"type": "error"
},
{
"inputs": [],
"name": "ECDSAInvalidSignature",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256"
}
],
"name": "ECDSAInvalidSignatureLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "ECDSAInvalidSignatureS",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "numerator",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "denominator",
"type": "uint256"
}
],
"name": "ERC2981InvalidDefaultRoyalty",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC2981InvalidDefaultRoyaltyReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "numerator",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "denominator",
"type": "uint256"
}
],
"name": "ERC2981InvalidTokenRoyalty",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC2981InvalidTokenRoyaltyReceiver",
"type": "error"
},
{
"inputs": [],
"name": "InvalidQueryRange",
"type": "error"
},
{
"inputs": [],
"name": "InvalidShortString",
"type": "error"
},
{
"inputs": [],
"name": "MintERC2309QuantityExceedsLimit",
"type": "error"
},
{
"inputs": [],
"name": "MintToZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "MintZeroQuantity",
"type": "error"
},
{
"inputs": [],
"name": "NotCompatibleWithSpotMints",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"inputs": [],
"name": "OwnerQueryForNonexistentToken",
"type": "error"
},
{
"inputs": [],
"name": "OwnershipNotInitializedForExtraData",
"type": "error"
},
{
"inputs": [],
"name": "ReentrancyGuardReentrantCall",
"type": "error"
},
{
"inputs": [],
"name": "SequentialMintExceedsLimit",
"type": "error"
},
{
"inputs": [],
"name": "SequentialUpToTooSmall",
"type": "error"
},
{
"inputs": [],
"name": "ShouldNotMintToBurnAddress",
"type": "error"
},
{
"inputs": [],
"name": "SpotMintTokenIdTooSmall",
"type": "error"
},
{
"inputs": [
{
"internalType": "string",
"name": "str",
"type": "string"
}
],
"name": "StringTooLong",
"type": "error"
},
{
"inputs": [],
"name": "TokenAlreadyExists",
"type": "error"
},
{
"inputs": [],
"name": "TokenIdsNotStrictlyAscending",
"type": "error"
},
{
"inputs": [],
"name": "TransferCallerNotOwnerNorApproved",
"type": "error"
},
{
"inputs": [],
"name": "TransferFromIncorrectOwner",
"type": "error"
},
{
"inputs": [],
"name": "TransferToNonERC721ReceiverImplementer",
"type": "error"
},
{
"inputs": [],
"name": "TransferToZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "URIQueryForNonexistentToken",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "autoApproved",
"type": "bool"
}
],
"name": "AutomaticApprovalOfTransferValidatorSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "_fromTokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_toTokenId",
"type": "uint256"
}
],
"name": "BatchMetadataUpdate",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "fromTokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "toTokenId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "ConsecutiveTransfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "EIP712DomainChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "_tokenId",
"type": "uint256"
}
],
"name": "MetadataUpdate",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "minter",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "free",
"type": "bool"
}
],
"name": "Minted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "RefundClaimed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "RefundCredited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldRenderer",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newRenderer",
"type": "address"
}
],
"name": "RendererUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "active",
"type": "bool"
}
],
"name": "SaleActiveUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldSigner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newSigner",
"type": "address"
}
],
"name": "TicketSignerUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "oldValidator",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newValidator",
"type": "address"
}
],
"name": "TransferValidatorUpdated",
"type": "event"
},
{
"inputs": [],
"name": "DEFAULT_TRANSFER_VALIDATOR",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TICKET_TYPEHASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TOTAL_SUPPLY",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "autoApproveTransfersFromValidator",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "claimRefund",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "contractURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "quantity",
"type": "uint256"
}
],
"name": "costFor",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "quantity",
"type": "uint256"
}
],
"name": "devMint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "quantity",
"type": "uint256"
}
],
"name": "directMint",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "directMintActive",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "directPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "eip712Domain",
"outputs": [
{
"internalType": "bytes1",
"name": "fields",
"type": "bytes1"
},
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "version",
"type": "string"
},
{
"internalType": "uint256",
"name": "chainId",
"type": "uint256"
},
{
"internalType": "address",
"name": "verifyingContract",
"type": "address"
},
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "uint256[]",
"name": "extensions",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ethUsdRate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "explicitOwnershipOf",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "addr",
"type": "address"
},
{
"internalType": "uint64",
"name": "startTimestamp",
"type": "uint64"
},
{
"internalType": "bool",
"name": "burned",
"type": "bool"
},
{
"internalType": "uint24",
"name": "extraData",
"type": "uint24"
}
],
"internalType": "struct IERC721A.TokenOwnership",
"name": "ownership",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "tokenIds",
"type": "uint256[]"
}
],
"name": "explicitOwnershipsOf",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "addr",
"type": "address"
},
{
"internalType": "uint64",
"name": "startTimestamp",
"type": "uint64"
},
{
"internalType": "bool",
"name": "burned",
"type": "bool"
},
{
"internalType": "uint24",
"name": "extraData",
"type": "uint24"
}
],
"internalType": "struct IERC721A.TokenOwnership[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "freeMintCap",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "freeMinted",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTransferValidationFunction",
"outputs": [
{
"internalType": "bytes4",
"name": "functionSignature",
"type": "bytes4"
},
{
"internalType": "bool",
"name": "isViewFunction",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getTransferValidator",
"outputs": [
{
"internalType": "address",
"name": "validator",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "lastMintAt",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxMintsPerWallet",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxQtyPerTx",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "mintCooldown",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "mintedPerWallet",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "nextTokenId",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "ownerOf",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "pendingRefunds",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceBps",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pricePerMint",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renderer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "salePrice",
"type": "uint256"
}
],
"name": "royaltyInfo",
"outputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "saleActive",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "autoApprove",
"type": "bool"
}
],
"name": "setAutomaticApprovalOfTransfersFromValidator",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "active",
"type": "bool"
}
],
"name": "setDirectMintActive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newPrice",
"type": "uint256"
}
],
"name": "setDirectPrice",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newRate",
"type": "uint256"
}
],
"name": "setEthUsdRate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newCap",
"type": "uint256"
}
],
"name": "setFreeMintCap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newMax",
"type": "uint256"
}
],
"name": "setMaxMintsPerWallet",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newMax",
"type": "uint256"
}
],
"name": "setMaxQtyPerTx",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newCooldownSeconds",
"type": "uint256"
}
],
"name": "setMintCooldown",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newPriceBps",
"type": "uint256"
}
],
"name": "setPriceBps",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newRenderer",
"type": "address"
}
],
"name": "setRenderer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "uint96",
"name": "bps",
"type": "uint96"
}
],
"name": "setRoyalty",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "active",
"type": "bool"
}
],
"name": "setSaleActive",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newSigner",
"type": "address"
}
],
"name": "setTicketSigner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "transferValidator_",
"type": "address"
}
],
"name": "setTransferValidator",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "totalPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "quantity",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "sig",
"type": "bytes"
}
],
"name": "sprayMint",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "wallet",
"type": "address"
},
{
"internalType": "uint256",
"name": "totalPrice",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "quantity",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
}
],
"name": "ticketDigest",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "ticketSigner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "ticketUsed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "tokenURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "tokensOfOwner",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "start",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stop",
"type": "uint256"
}
],
"name": "tokensOfOwnerIn",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalMinted",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalPendingRefunds",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "result",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupplyCirculating",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address payable",
"name": "to",
"type": "address"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import {ERC721AC} from "@limitbreak/creator-token-standards/erc721c/ERC721AC.sol";
import {ERC721AQueryable} from "erc721a/contracts/extensions/ERC721AQueryable.sol";
import {ERC721A, IERC721A} from "erc721a/contracts/ERC721A.sol";
import {ERC2981} from "openzeppelin-contracts/contracts/token/common/ERC2981.sol";
import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol";
import {EIP712} from "openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol";
import {ECDSA} from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
import {Base64} from "openzeppelin-contracts/contracts/utils/Base64.sol";
interface IRenderer {
function tokenURI(uint256 tokenId) external view returns (string memory);
}
contract R0b1nPunkzAC is ERC721AC, ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard, EIP712 {
event MetadataUpdate(uint256 _tokenId);
event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
uint256 public constant TOTAL_SUPPLY = 10_000;
bytes32 public constant TICKET_TYPEHASH =
keccak256("MintTicket(address wallet,uint256 totalPrice,uint256 quantity,uint256 nonce,uint256 expiry)");
uint256 public freeMinted;
bool public saleActive;
bool public directMintActive;
uint256 public ethUsdRate;
uint256 public priceBps = 500;
uint256 public directPrice;
address public renderer;
address public ticketSigner;
mapping(bytes32 => bool) public ticketUsed;
mapping(address => uint256) public lastMintAt;
mapping(address => uint256) public mintedPerWallet;
mapping(address => uint256) public pendingRefunds;
uint256 public totalPendingRefunds;
uint256 public freeMintCap;
uint256 public mintCooldown;
uint256 public maxMintsPerWallet = 15;
uint256 public maxQtyPerTx = 15;
event Minted(address indexed minter, uint256 indexed tokenId, bool free);
event TicketSignerUpdated(address indexed oldSigner, address indexed newSigner);
event RendererUpdated(address indexed oldRenderer, address indexed newRenderer);
event SaleActiveUpdated(bool active);
event RefundCredited(address indexed to, uint256 amount);
event RefundClaimed(address indexed to, uint256 amount);
constructor(address initialTicketSigner, uint256 initialEthUsdRate)
ERC721AC("R0b!nPunkz", "R0BPNKZ")
EIP712("R0b1nPunkz", "1")
Ownable(msg.sender)
{
require(initialEthUsdRate > 0, "rate=0");
ethUsdRate = initialEthUsdRate;
ticketSigner = initialTicketSigner;
emit TicketSignerUpdated(address(0), initialTicketSigner);
_setDefaultRoyalty(msg.sender, 1000);
}
function _startTokenId() internal pure override returns (uint256) {
return 1;
}
function _requireCallerIsContractOwner() internal view virtual override {
_checkOwner();
}
function isApprovedForAll(address owner, address operator)
public
view
virtual
override(ERC721A, ERC721AC, IERC721A)
returns (bool)
{
return ERC721AC.isApprovedForAll(owner, operator);
}
function _msgSenderERC721A() internal view virtual override(ERC721A, ERC721AC) returns (address) {
return ERC721AC._msgSenderERC721A();
}
function _beforeTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity)
internal
virtual
override(ERC721A, ERC721AC)
{
ERC721AC._beforeTokenTransfers(from, to, startTokenId, quantity);
}
function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity)
internal
virtual
override(ERC721A, ERC721AC)
{
ERC721AC._afterTokenTransfers(from, to, startTokenId, quantity);
}
function sprayMint(uint256 totalPrice, uint256 quantity, uint256 nonce, uint256 expiry, bytes calldata sig)
external
payable
nonReentrant
{
require(saleActive, "sale closed");
require(ticketSigner != address(0), "ticket mint disabled");
require(block.timestamp <= expiry, "ticket expired");
require(block.timestamp >= lastMintAt[msg.sender] + mintCooldown, "cooldown");
require(quantity > 0 && quantity <= maxQtyPerTx, "bad quantity");
uint256 minted = mintedPerWallet[msg.sender];
require(minted + quantity <= maxMintsPerWallet, "wallet cap");
require(_totalMinted() + quantity <= TOTAL_SUPPLY, "sold out");
uint256 unitPrice = pricePerMint();
uint256 paidCount;
if (unitPrice == 0) {
require(totalPrice == 0, "bad ticket price");
} else {
require(totalPrice % unitPrice == 0, "bad ticket price");
paidCount = totalPrice / unitPrice;
require(paidCount <= quantity, "bad ticket price");
}
require(msg.value == totalPrice, "wrong payment");
uint256 freeCount = quantity - paidCount;
if (freeCount > 0) {
require(freeMintCap == 0 || freeMinted + freeCount <= freeMintCap, "free cap reached");
}
bytes32 digest = ticketDigest(msg.sender, totalPrice, quantity, nonce, expiry);
require(!ticketUsed[digest], "ticket used");
require(ECDSA.recover(digest, sig) == ticketSigner, "bad signature");
ticketUsed[digest] = true;
lastMintAt[msg.sender] = block.timestamp;
mintedPerWallet[msg.sender] = minted + quantity;
freeMinted += freeCount;
uint256 startId = _nextTokenId();
_safeMint(msg.sender, quantity);
for (uint256 i = 0; i < quantity; i++) {
emit Minted(msg.sender, startId + i, i < freeCount);
}
}
function directMint(uint256 quantity) external payable nonReentrant {
require(saleActive, "sale closed");
require(directMintActive, "direct off");
require(block.timestamp >= lastMintAt[msg.sender] + mintCooldown, "cooldown");
require(quantity > 0 && quantity <= maxQtyPerTx, "bad quantity");
uint256 minted = mintedPerWallet[msg.sender];
require(minted + quantity <= maxMintsPerWallet, "wallet cap");
require(_totalMinted() + quantity <= TOTAL_SUPPLY, "sold out");
uint256 cost = directPrice * quantity;
require(msg.value >= cost, "underpaid");
lastMintAt[msg.sender] = block.timestamp;
mintedPerWallet[msg.sender] = minted + quantity;
uint256 startId = _nextTokenId();
_safeMint(msg.sender, quantity);
for (uint256 i = 0; i < quantity; i++) {
emit Minted(msg.sender, startId + i, false);
}
if (msg.value > cost) _safeRefund(msg.sender, msg.value - cost);
}
function ticketDigest(address wallet, uint256 totalPrice, uint256 quantity, uint256 nonce, uint256 expiry)
public
view
returns (bytes32)
{
return _hashTypedDataV4(keccak256(abi.encode(TICKET_TYPEHASH, wallet, totalPrice, quantity, nonce, expiry)));
}
function pricePerMint() public view returns (uint256) {
return (priceBps * 1 ether) / (10_000 * ethUsdRate);
}
function costFor(uint256 quantity) external view returns (uint256) {
return pricePerMint() * quantity;
}
function totalMinted() external view returns (uint256) {
return _totalMinted();
}
function nextTokenId() external view returns (uint256) {
return _nextTokenId();
}
function totalSupplyCirculating() external view returns (uint256) {
return _totalMinted();
}
function setSaleActive(bool active) external onlyOwner {
saleActive = active;
emit SaleActiveUpdated(active);
}
function setEthUsdRate(uint256 newRate) external onlyOwner {
require(newRate > 0, "rate=0");
ethUsdRate = newRate;
}
function setPriceBps(uint256 newPriceBps) external onlyOwner {
priceBps = newPriceBps;
}
function setRenderer(address newRenderer) external onlyOwner {
emit RendererUpdated(renderer, newRenderer);
renderer = newRenderer;
emit BatchMetadataUpdate(_startTokenId(), type(uint256).max);
}
function setTicketSigner(address newSigner) external onlyOwner {
emit TicketSignerUpdated(ticketSigner, newSigner);
ticketSigner = newSigner;
}
function setDirectMintActive(bool active) external onlyOwner {
directMintActive = active;
}
function setDirectPrice(uint256 newPrice) external onlyOwner {
directPrice = newPrice;
}
function setFreeMintCap(uint256 newCap) external onlyOwner {
freeMintCap = newCap;
}
function setMintCooldown(uint256 newCooldownSeconds) external onlyOwner {
mintCooldown = newCooldownSeconds;
}
function setMaxMintsPerWallet(uint256 newMax) external onlyOwner {
maxMintsPerWallet = newMax;
}
function setMaxQtyPerTx(uint256 newMax) external onlyOwner {
maxQtyPerTx = newMax;
}
function setRoyalty(address receiver, uint96 bps) external onlyOwner {
require(bps <= 1000, "royalty max 10%");
_setDefaultRoyalty(receiver, bps);
}
function devMint(address to, uint256 quantity) external onlyOwner nonReentrant {
require(_totalMinted() + quantity <= TOTAL_SUPPLY, "sold out");
uint256 startId = _nextTokenId();
_safeMint(to, quantity);
for (uint256 i = 0; i < quantity; i++) {
emit Minted(to, startId + i, true);
}
}
function withdraw(address payable to) external onlyOwner nonReentrant {
require(to != address(0), "zero addr");
uint256 withdrawable = address(this).balance - totalPendingRefunds;
require(withdrawable > 0, "nothing to withdraw");
(bool ok,) = to.call{value: withdrawable}("");
require(ok, "withdraw failed");
}
function claimRefund() external nonReentrant {
uint256 amount = pendingRefunds[msg.sender];
require(amount > 0, "no refund");
pendingRefunds[msg.sender] = 0;
totalPendingRefunds -= amount;
(bool ok,) = payable(msg.sender).call{value: amount}("");
require(ok, "refund failed");
emit RefundClaimed(msg.sender, amount);
}
function _safeRefund(address to, uint256 amount) internal {
if (amount == 0) return;
(bool ok,) = payable(to).call{value: amount}("");
if (!ok) {
pendingRefunds[to] += amount;
totalPendingRefunds += amount;
emit RefundCredited(to, amount);
}
}
function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
require(renderer != address(0), "no renderer");
return IRenderer(renderer).tokenURI(tokenId);
}
function contractURI() external view returns (string memory) {
(address recv, uint256 amt) = royaltyInfo(0, 10000);
string memory svg =
'<svg xmlns="http://www.w3.org/2000/svg" width="350" height="350" shape-rendering="crispEdges"><rect width="350" height="350" fill="#16181f"/><rect x="14" y="14" width="322" height="322" fill="none" stroke="#2b2f3c" stroke-width="4"/><text x="30" y="150" font-family="monospace" font-size="52" font-weight="900" fill="#ff2e88">R0b</text><text x="150" y="150" font-family="monospace" font-size="52" font-weight="900" fill="#ffe600">!</text><text x="176" y="150" font-family="monospace" font-size="52" font-weight="900" fill="#12e0ff">nPunkz</text><text x="30" y="196" font-family="monospace" font-size="22" font-weight="900" fill="#7ce096" letter-spacing="6">IN THE HOOD</text><rect x="30" y="250" width="290" height="12" fill="#ff2e88"/><rect x="30" y="268" width="200" height="8" fill="#12e0ff"/></svg>';
string memory json = string.concat(
'{"name":"R0b!nPunkz in the Hood","description":"',
_COLLECTION_DESC,
'","image":"data:image/svg+xml;base64,',
Base64.encode(bytes(svg)),
'","seller_fee_basis_points":',
_u(amt),
',"fee_recipient":"',
_addr(recv),
'"}'
);
return string.concat("data:application/json;base64,", Base64.encode(bytes(json)));
}
string internal constant _COLLECTION_DESC =
"R0b!nPunkz in the Hood - the first 10,000 filthy-rich traits punkz living fully on-chain on the Robinhood chain.";
function _u(uint256 v) internal pure returns (string memory) {
if (v == 0) return "0";
uint256 j = v;
uint256 len;
while (j != 0) {
len++;
j /= 10;
}
bytes memory b = new bytes(len);
while (v != 0) {
len--;
b[len] = bytes1(uint8(48 + v % 10));
v /= 10;
}
return string(b);
}
function _addr(address a) internal pure returns (string memory) {
bytes16 hexc = "0123456789abcdef";
bytes20 d = bytes20(a);
bytes memory s = new bytes(42);
s[0] = "0";
s[1] = "x";
for (uint256 i = 0; i < 20; i++) {
s[2 + i * 2] = hexc[uint8(d[i]) >> 4];
s[3 + i * 2] = hexc[uint8(d[i]) & 0x0f];
}
return string(s);
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721AC, ERC721A, IERC721A, ERC2981)
returns (bool)
{
return interfaceId == bytes4(0x49064906)
|| ERC721AC.supportsInterface(interfaceId)
|| ERC2981.supportsInterface(interfaceId);
}
receive() external payable {}
}
Chain explorer6510msChain node80ms