MinaNFT Code Coverage Reports

website·Indexed 31 days ago

https://docs.minanft.io

Technical code coverage metrics and reports for the MinaNFT project, generated by istanbul. The documentation provides line-by-line execution data, statement, branch, and function coverage for source files including marketplace logic, metadata handling, and o1js contract implementations.

Tokens
126K
Snippets
789
Records
1K
Agent score
51%

What's inside MinaNFT

  1. Overview of the BulletinBoard contract

    The BulletinBoard contract is a centralized event emitter used to track and broadcast NFT marketplace activities. It allows for the standardization of events such as new collection listings, offers, bids, and completed sales. To maintain clarity in monitoring, all events emitted by this contract are prefixed with BB_.
  2. Overview of MinaNFTNameServiceContract

    v1

    The MinaNFTNameServiceContract is a stateless smart contract on the Mina blockchain designed to facilitate the lifecycle of Non-Fungible Tokens (NFTs). It acts as a centralized point for calls to MinaNFTContract and supports the following key capabilities:

    • Stateless Processing: Efficiently processes multiple transactions within a single block.
    • NFT Minting: Creates token accounts and deploys MinaNFTContract on those accounts.
    • Upgradability: Supports code upgrades to new versions without changing the contract address.
    • Management: Provides secure verification for minting, updating, and transferring NFTs.
  3. Overview of the NFTStandardOwner contract

    The NFTStandardOwner contract serves as the default implementation of the NFTOwnerBase interface. It manages administrative authority for NFT collections, including the ability to pause/resume contracts, change verification keys, and authorize transfers.
  4. Overview of MinaNFTContract features

    v1

    The MinaNFTContract is a Mina blockchain smart contract for creating and managing NFTs with a focus on metadata integrity and privacy. Key capabilities include:

    • Rich Metadata: Supports strings, text, images, files, video, and documents.
    • Visibility Control: Metadata can be designated as either public or private.
    • Provable Data: Uses Merkle Maps and Trees to allow on-chain and off-chain verification of every byte of metadata.
    • Privacy-Preserving Proofs: Supports recursive proofs for updating metadata and proving redacted (sanitized) data content.
    • Account Abstraction: Ownership is managed via a private key not registered on the network. An escrow mechanism with three private keys allows for owner key alteration (recovery/complex transactions).
    • Verification Badges: Integration with Badge contracts to verify specific metadata (e.g., Twitter name). Badges remain valid until metadata is changed, at which point re-verification is required.
  5. Overview of MinaNFT Architecture

    The MinaNFT platform leverages the Mina Protocol's zero-knowledge (ZK) capabilities to provide NFTs with enhanced privacy, verifiability, and flexible content integration. The architecture separates core NFT logic from administrative logic to ensure standardization and interoperability across wallets, marketplaces, and explorers.

    Metadata is stored off-chain (e.g., using IPFS), and while a recommended JSON format exists, the specific storage and hashing method are left to the collection creator's choice.

  6. Overview of the NFTAdmin contract

    The NFTAdmin contract is the foundational administrative layer for NFT collections on the Mina Protocol. It manages essential administrative tasks including contract upgrades, pausing and resuming operations, and ownership management. It implements NFTAdminBase, PausableContract, and OwnableContract. Custom admin contracts can extend NFTAdmin to implement specific administrative logic while maintaining a standardized interface.
  7. Overview of the BulletinBoard Smart Contract

    The BulletinBoard contract is a centralized event emitter designed for NFT marketplace activities. It does not handle NFT transfers or escrow; instead, it provides a standardized mechanism for broadcasting events to help indexers and UIs track marketplace activity. All events emitted by this contract are prefixed with BB_ to distinguish them from events emitted directly by NFT contracts.
  8. Overview of the NFT Metadata Flow

    v3

    The metadata flow for NFTs consists of four primary stages:

    1. Creation: Instantiate a Metadata object with core fields (name, image, description) and optional traits via addTrait(). Private traits can be marked to be excluded from public JSON.
    2. Structuring: Text fields use a Text Merkle tree for secure hashing of large strings. Key-value pairs are managed via MetadataMap (an IndexedMerkleMap) or MetadataTree to allow proof-of-inclusion without revealing all data.
    3. Pinning: Store the metadata off-chain (e.g., IPFS) using pinMetadata(), which generates an ipfsHash and a metadataRoot.
    4. On-Chain Integration: The metadataRoot and ipfsHash are passed into the MintParams of the NFT contract to ensure data integrity.
  9. Overview of the NFTStandardApproval contract

    The NFTStandardApproval contract is the default implementation of the NFTApprovalBase interface. It provides the logic for managing NFT approvals, administrative authority, and transfer validation.
  10. Overview of VerificationKeyUpgradeAuthority

    VerificationKeyUpgradeAuthority is a smart contract designed to upgrade verification keys of other contracts without requiring redeployment. It implements a governance system where authorized validators vote on upgrade proposals. Key features include secure verification key management, a ZK-proof-based voting mechanism to protect sensitive information, and an upgrade database to track proposal validity periods.
  11. Overview of the NFT Contract class

    The NFT contract manages the state and behavior of a single NFT within a collection. It handles ownership, metadata, storage, pricing, and permissions. Key capabilities include updating NFT properties with proofs, transferring ownership, buying/selling, upgrading verification keys, and pausing/resuming the NFT.