Contract Metadata (ERC-7572)

Contract Metadata (ERC-7572)

Fabrica token contracts implement the ERC-7572 standard for contract-level metadata, providing enhanced discoverability and interoperability for property tokens.

Contract-Level Metadata

Unlike token-specific metadata (which describes individual properties), contract-level metadata provides information about the token contract itself, including:

  • Contract name and description
  • External links (documentation, website)
  • Supported interfaces
  • Issuer information
  • Legal framework references

Implementation

The Fabrica token contract implements the ERC-7572 interface:

function contractURI() external view returns (string memory);

This function returns a URI pointing to a JSON metadata file that follows the ERC-7572 metadata schema:

{
  "name": "Fabrica Property Tokens",
  "description": "Tokenized real estate properties with legal backing",
  "image": "https://ipfs.fabrica.land/ipfs/QmYXq44Qdwt7aq4gSbSWJXXZ8GJFGqzxcQM2ioTwXH4Kqm",
  "external_link": "https://fabrica.land",
  "seller_fee_basis_points": 0,
  "fee_recipient": "0x0000000000000000000000000000000000000000"
}

Benefits

Contract-level metadata provides several advantages:

  1. Marketplace Integration: Enables marketplaces to display collection information
  2. Verification: Helps users verify the authenticity of Fabrica token contracts
  3. Discoverability: Improves contract discoverability through metadata indexing
  4. Legal Framework: Links to the legal framework governing the token contract

Accessing Contract Metadata

Contract metadata can be accessed by:

  1. Calling the contractURI() function directly on the token contract
  2. Using blockchain explorers that support ERC-7572
  3. Through the Fabrica API's metadata endpoints

This implementation enhances the overall ecosystem by providing standardized contract-level information that complements the token-specific metadata for individual properties.