- 
                Notifications
    You must be signed in to change notification settings 
- Fork 798
ERC-8049: Contract-Level Onchain Metadata #1260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            nxt3d
  wants to merge
  10
  commits into
  ethereum:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
nxt3d:contract-metadata-erc
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            
          
      
        
          +171
        
        
          −0
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    - 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.
| 🛑  | 
              
                    abcoathup
  
              
              reviewed
              
                  
                    Oct 17, 2025 
                  
              
              
            
            
              
                    abcoathup
  
              
              reviewed
              
                  
                    Oct 17, 2025 
                  
              
              
            
            
Co-authored-by: Andrew B Coathup <[email protected]>
Co-authored-by: Andrew B Coathup <[email protected]>
- 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
- 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
| The commit 86cecd6 (as a parent of 65df388) contains errors. | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
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
Technical Details
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.