Skip to content

Conversation

@nxt3d
Copy link

@nxt3d nxt3d commented Oct 15, 2025

Summary

Introduces a standard for storing contract-level metadata onchain using ERC-8042's Diamond Storage pattern. Extends ERC-7572's concept with onchain storage for cross-chain compatibility and upgradable contracts.

Key Features

  • Diamond Storage: Uses ERC-8042 for predictable storage locations
  • Cross-Chain Compatible: Storage slots remain consistent across deployments
  • ERC-7572 Compatible: Maintains compatibility with existing contract metadata standards
  • Upgradable Support: Metadata persists through contract upgrades

Technical Details

  • Diamond Storage pattern for predictable storage locations
  • Support for name, description, image, etc.

Example Use Case

Contract ENS Naming: Any contract can store its ENS name using this standard:

  • name: "MyToken"
  • description: "A decentralized exchange for trading ERC-20 tokens"
  • ens_name: "mycontract.eth"

This enables contracts to self-identify with ENS names while maintaining consistent metadata across chains and through upgrades.

nxt3d added 5 commits October 10, 2025 10:10
- Defines standard for storing contract metadata onchain using ERC-7201 namespaced storage
- Provides predictable storage locations for cross-chain compatibility
- Extends ERC-7572 concept with onchain storage
- Includes interface, examples, and reference implementation
- Replace ERC-7201 namespaced storage with Diamond Storage pattern
- Use simpler keccak256(namespace) calculation instead of complex ERC-7201 formula
- Update namespace to 'ercXXXX.contract.metadata.storage' for uniqueness
- Add requires: 8042 to header
- Update abstract to reference ERC-8042's Diamond Storage pattern
- Update security considerations to reference ERC-8042.
@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Oct 15, 2025

🛑 eip-review-bot failed for an unknown reason. Please see logs for more details, and report this issue at the eip-review-bot repository.

@github-actions github-actions bot added the w-ci label Oct 15, 2025
nxt3d and others added 2 commits October 17, 2025 10:18
@github-actions github-actions bot added w-ci and removed w-ci labels Oct 17, 2025
- Rename ERCS/erc-draft_contract-metadata.md to ERCS/erc-8049.md
- Reflects ERC editor's assignment of ERC-8049 to the contract metadata standard
@nxt3d nxt3d changed the title Add ERC: Contract-Level Metadata with Diamond Storage ERC-8049: Contract-Level Metadata with Diamond Storage Oct 17, 2025
@github-actions github-actions bot added w-ci and removed w-ci labels Oct 17, 2025
- Remove 'requires: 8042' from header (now optional)
- Update title and abstract to reflect optional Diamond Storage
- Add 'Optional Diamond Storage' section with namespace 'erc8049.contract.metadata.storage'
- Add simple Basic Implementation without Diamond Storage
- Add Diamond Storage Implementation as separate example
- Update pragma to ^0.8.25 in both implementations
- Clarify benefits for cross-chain applications and upgradable contracts
- Update security considerations to only reference ERC-8042 for Diamond Storage implementations
- Both implementations tested and validated with comprehensive test suite
@nxt3d nxt3d changed the title ERC-8049: Contract-Level Metadata with Diamond Storage ERC-8049: Contract-Level Onchain Metadata Oct 25, 2025
@github-actions github-actions bot removed the w-ci label Oct 25, 2025
@github-actions
Copy link

The commit 86cecd6 (as a parent of 65df388) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci label Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants