argotorg / argotorg/solidity

Rename the Solidity contract metadata.json to Blueprint

Open
#15,614 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

## Background
Solidity currently outputs [Contract Metadata](https://docs.soliditylang.org/en/latest/metadata.html) as a JSON file either with `solc --metadata` flag or by having it in `outputSelection`.

Example outputSelection

```js
"outputSelection": {
"*": {
"*": [
...
"metadata"
],
}
}
```

One use case of the file is [source code verification](https://docs.sourcify.dev/docs/metadata) by [appending its hash](https://playground.sourcify.dev/) in the onchain bytecode, which acts as a "compilation fingerprint". The file contains two types of information about the contract:
1. How to interface with this contract (ABI, userdoc, devdoc)
2. How to reproduce this compilation (language, version, compilerSettings, sources)

## Motivation

All other problems of the metadata.json aside, one problem is that the name "metadata" is generic. It is used in different places in similar contexts for different things. When one mentions "metadata" it can mean:
1. Solidity's metadata output JSON file
2. The bytecode metadata in CBOR encoding
3. [General contract metadata](https://github.com/MetaMask/contract-metadata) such as names
4. [NFT metadata](https://docs.opensea.io/docs/metadata-standards)

While the list can go longer the common ambiguity is between 1. and 2.. As we also plan to propose a [separate metadata section in EOF](https://github.com/kuzdogan/EIPs/blob/14f624a62c82ab9afecdf0ee88097a26492377f1/EIPS/eip-eof-metadata.md), I thought this might be a good time to tackle this ambiguity.

## Proposal
I propose to name this JSON file output by the Solidity compiler to be a **"blueprint"**

- "Blueprint" is not used anywhere within the Ethereum context.
- The name is a good analogy describing the file. It is indeed a description of how to build the contract.

Obviously it is not straightforward to change it overnight as it would be a breaking change. There will likely be a transition period until the community and the tooling catches up with the changes. We can discuss and weigh the advantages and disadvantages to decide if this is worth pursuing or not.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how Solidity exposes the metadata JSON output through the `--metadata` flag and `outputSelection`, then assess the transition impact described in the proposal. Done would require an agreed design for renaming the output to "blueprint" and handling the breaking-change transition across affected tooling.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.