Skip to content

Conversation

@divisio74
Copy link
Contributor

NFT Registry

A decentralized registry for discovering and verifying GRC-721 NFT collections on Gno.land.

Overview

The NFT Registry provides a central place where NFT collections can register themselves, get verified by admins, and be discovered by users and marketplaces.

Features

  • Self-registration: Any GRC-721 collection can register itself
  • Verification system: Admin-controlled verification for legitimate collections
  • Discovery: Query collections by address or browse all registered collections
  • Admin management: Owner can add/remove admins to help with verification
  • Web interface: Full markdown rendering for easy browsing

Usage

For NFT Collection Owners

Register your collection by calling the registry from your NFT realm:

import "gno.land/r/pierre115/nftregistry"

// Register registers this collection on the NFT registry
func Register(_ realm) {
	nftregistry8.RegisterCollection(
		myRealmAddr,
		"Test NFT Collection",
		"TEST",
		"art",
		"Last wars",
		"https://example.com",
		false,
		nft.Getter(),
	)
}

For Users & Marketplaces

Query collections to discover NFTs:

// Get a specific collection
collection := nftregistry.GetCollection(collectionAddr)

// Get all verified collections
verified := nftregistry.GetVerifiedCollections()

// Get all registered collections
all := nftregistry.GetAllCollections()

For Admins

Verify legitimate collections:

// Verify a collection (admin only)
nftregistry.VerifyCollection(collectionAddr)

// Unverify a collection (admin only)
nftregistry.UnverifyCollection(collectionAddr)

For Owner

Manage the admin team:

// Add a new admin (owner only)
nftregistry.AddAdmin(adminAddr)

// Remove an admin (owner only)
nftregistry.RemoveAdmin(adminAddr)

Collection Structure

Each registered collection contains:

  • Address: The realm address of the collection
  • Name: Collection name (from GRC-721 metadata)
  • Symbol: Collection symbol (from GRC-721 metadata)
  • Verified: Whether the collection has been verified by admins
  • Registered At: Block height when registered

Web Interface

Visit /r/pierre115/nftregistry to browse:

  • Statistics (total collections, verified count)
  • List of verified collections
  • List of pending verification collections

Requirements

Collections must implement the GRC-721 interface with:

  • GetName() string
  • GetSymbol() string

Security

  • Only the collection realm itself can register (prevents spam)
  • Only admins can verify/unverify collections
  • Only the owner can manage admins
  • Owner cannot be removed as admin

Example

See the full implementation and web UI at: /r/pierre115/nftregistry

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant