Skip to content

Repository files navigation

NFAscan

The "Etherscan moment" for Non-Fungible Agents (NFA)

A blockchain explorer for BAP-578 Non-Fungible Agents on Binance Smart Chain. Inspect agent identity, metadata, permissions, learning snapshots, logic addresses, and provenance across applications.

Live Demo: https://nfascan.vercel.app


Features

Core Explorer Functionality

  • Agent Identity - View name, persona, voice hash, animation URI
  • Metadata Inspection - Full metadata structure including vault information
  • Permissions Viewer - Inspect delegations and access control
  • Learning Root Snapshots - Track learningRoot history and updates
  • Logic Address - Display current logic implementation address
  • Event Timeline - Complete history of all agent events
  • Provenance Tracking - Transfer history and ownership chain

Advanced Features

  • 📊 Reputation Scoring - Visual reputation gauge based on prediction accuracy
  • 🤖 Auto-Trade Authorization - Monitor trading permissions and limits
  • 💰 Agent Balance - Real-time BNB balance tracking
  • 📈 Learning Metrics - Success rate, interaction count, confidence scores
  • 🔍 Address Lookup - Find all agents owned by an address
  • 🎯 Event Filtering - Filter by event type and agent ID

Tech Stack

  • Frontend: React 19 + TypeScript
  • Build Tool: Vite 7
  • Styling: Tailwind CSS v4
  • Blockchain: viem (Ethereum library)
  • Animations: Motion (Framer Motion)
  • Routing: React Router 7

Performance Optimizations

  • ⚡️ Multicall Batching - Efficient RPC calls via viem multicall
  • 🧩 Code Splitting - Separate vendor/viem/app chunks
  • 📦 Event Log Chunking - Handle large block ranges
  • 💾 IPFS Caching - Memory cache with fallback gateways
  • 🚀 Lazy Loading - Route-based code splitting

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/saiboyizhan/nfascan.git
cd nfascan

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:5173

Configuration

Update the contract address in src/config/contracts.ts:

export const NFA_CONTRACT_ADDRESS = '0xYourContractAddress' as const;

Switch between BSC testnet and mainnet in src/config/chains.ts:

// For testnet
export const ACTIVE_CHAIN = SUPPORTED_CHAINS.testnet;

// For mainnet
export const ACTIVE_CHAIN = SUPPORTED_CHAINS.mainnet;

Build

# Type check
npm run build

# Preview production build
npm run preview

Project Structure

src/
├── components/
│   ├── agent/          # Agent detail sections
│   ├── layout/         # Header, Footer, Layout
│   ├── shared/         # Reusable components
│   └── ui/             # Base UI components
├── config/
│   ├── chains.ts       # Chain configuration
│   └── contracts.ts    # Contract ABI & address
├── hooks/              # React hooks for data fetching
├── lib/
│   ├── client.ts       # viem client setup
│   ├── events.ts       # Event fetching & parsing
│   ├── ipfs.ts         # IPFS gateway utilities
│   ├── nfa.ts          # Contract read functions
│   └── utils.ts        # Helper functions
├── pages/              # Route pages
└── styles/             # Global styles

BAP-578 Standard Coverage

NFAscan implements comprehensive support for the BAP-578 Non-Fungible Agent standard:

Feature Status Notes
Agent State Active, Paused, Terminated
Metadata Name, Persona, Voice Hash, Animation URI
Learning Metrics Interactions, Success Rate, Learning Root
Prediction Profile Total/Correct Predictions, Reputation Score
Auto-Trade Auth Limits, Daily Usage, Expiration
Permissions Delegates, Access Levels, Expiry
Memory Modules Module Registry
Logic Address Current Implementation Address
Vault Management Vault URI, Hash, Balance
Event History Complete Event Timeline

Roadmap

  • Multi-chain support (Ethereum, Polygon, etc.)
  • Agent comparison view
  • Advanced analytics dashboard
  • Export data to CSV/JSON
  • Real-time notifications via WebSocket
  • Agent search by name/metadata
  • Transaction history with gas tracking

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details


Acknowledgments


Contact

For questions or collaboration, reach out via:


Built with ❤️ for the NFA community

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages