CoreNFT: Non-Fungible Token Standard for Core Blockchain
CoreNFT: Non-Fungible Token Standard for Core Blockchain
Abstract
This standard defines the CoreNFT interface and provides an API for smart contracts to track ownership, transfer NFTs, and enable interoperability with wallets, marketplaces, and other decentralized applications on the Core Blockchain.
Motivation
To ensure NFTs created on Core Blockchain can be seamlessly integrated with a wide range of wallets, marketplaces, and tools, a consistent standard is essential. Inspired by Ethereum's ERC-721, CoreNFT addresses the need for a native NFT protocol adapted to Core's architecture and optimizations.
Specification
Interfaces
CoreNFT (Required)
pragma solidity ^0.8.0;
/// @title CoreNFT Standard Interface
interface CBC721 /* is CBC165 */ {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256);
function ownerOf(uint256 tokenId) external view returns (address);
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external payable;
function safeTransferFrom(address from, address to, uint256 tokenId) external payable;
function transferFrom(address from, address to, uint256 tokenId) external payable;
function approve(address approved, uint256 tokenId) external payable;
function setApprovalForAll(address operator, bool approved) external;
function getApproved(uint256 tokenId) external view returns (address);
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
Core165 (Required - Interface Detection)
interface CBC165 {
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
CoreNFTReceiver (Required for wallets/dApps that accept safe transfers)
interface CBC721Receiver {
function onCBC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}
Optional Extensions
CoreNFTMetadata (Optional)
interface CBC721Metadata /* is CBC721 */ {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
CoreNFTEnumerable (Optional)
interface CBC721Enumerable /* is CBC721 */ {
function totalSupply() external view returns (uint256);
function tokenByIndex(uint256 index) external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
}
Metadata JSON Schema
{
"title": "CoreNFT Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the NFT"
},
"description": {
"type": "string",
"description": "Description of the NFT"
},
"image": {
"type": "string",
"description": "URI of an image representing the NFT"
}
}
}
Design Considerations
Why Not ERC-20?
Each CoreNFT is non-fungible — unique and not interchangeable. Unlike ERC-20 (or Core20) tokens, each NFT has individual ownership, metadata, and identity.
Identification
Each NFT is uniquely identified by a uint256 tokenId
inside the contract. This ID does not change during the lifetime of the NFT. The combination of contract address + tokenId makes the NFT globally unique on Core Blockchain.
Transfer Safety
- Use
safeTransferFrom()
for smart contract-to-contract transfers. - Contracts should implement
onCoreNFTReceived()
to acknowledge receipt. - If not implemented correctly, tokens may be lost (irrecoverably locked).
Use Cases
- Digital Collectibles: Artwork, avatars, or gaming skins
- Tokenized Assets: Real estate, cars, luxury goods
- Utility NFTs: Access tokens, certificates, event tickets
Best Practices
- Implement CoreNFTMetadata and CoreNFTEnumerable if user experience and discovery are priorities.
- Avoid unbounded loops to ensure scalability.
- Avoid assumptions about tokenId patterns — always treat them as opaque.
Rationale
The CoreNFT standard provides a comprehensive framework for non-fungible tokens on the Core Blockchain. By defining clear interfaces for ownership tracking, transfer mechanisms, and metadata handling, this standard ensures interoperability across the Core ecosystem while maintaining the unique characteristics of NFTs.
Backward Compatibility
This standard is designed to be compatible with existing NFT implementations and can work alongside other token standards on the Core Blockchain.
Security Considerations
- Implement proper access controls for transfer and approval functions
- Use safe transfer methods when interacting with smart contracts
- Validate token ownership before allowing transfers
- Consider gas optimization for batch operations
- Ensure proper error handling for edge cases
Conclusion
The CoreNFT standard provides a robust foundation for non-fungible tokens on the Core Blockchain, enabling seamless integration with wallets, marketplaces, and decentralized applications while maintaining the unique characteristics that make NFTs valuable.
Copyright
Copyright and related rights waived via CC0.