feat: improve tronbox compile & add jsoninput file output#321
Open
simbadMarino wants to merge 3 commits intotronprotocol:masterfrom
Open
feat: improve tronbox compile & add jsoninput file output#321simbadMarino wants to merge 3 commits intotronprotocol:masterfrom
simbadMarino wants to merge 3 commits intotronprotocol:masterfrom
Conversation
- Update Solidity compiler input/output to match v0.8.25: - Remove legacyAST - Add metadata, methodIdentifiers, userdoc, devdoc, storageLayout - Make paths relative for reproducible builds - Add per-contract compilation capability to produce single JSON inputs - Update contractSchema to include metadata and drop legacyAST - Prepares for future verification, debugging, and automation features - Matches latest Solidity documentation: https://docs.soliditylang.org/en/v0.8.25/using-the-compiler.html
Improved test coverage for : - Compiling separate contracts (compile command upgrade) - Deploying contracts based on new artifact schema - Updated compiler outputSelection format
- include compile instructions for specific contracts
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
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
This PR enables tronbox to generate a standard solcjsoninput file for contract verification and debugging purposes.
The goal is to align TronBox with modern Solidity tooling (Hardhat / Foundry style architecture), improve reproducibility, and ensure explorer-grade verification compatibility.
Motivation:
Modern smart contract verification solutions rely on solcjson input files instead of flatten contracts which is proven to be cumbersome, moreover, aligning the solidity compiler settings with latest supported version makes tronbox future proof.
Changes:
Automated md5 hashed-named solcjsoninput file generation on
root/build-infofolder after compilation succeedsUpdate Solidity compiler input/output to match v0.8.25:
Make paths relative for reproducible builds
Add per-contract compilation capability to produce single JSON inputs
Update contractSchema to include metadata and drop legacyAST
Prepares for future verification, debugging, and automation features
Matches latest Solidity documentation:
https://docs.soliditylang.org/en/v0.8.25/using-the-compiler.html
Improved test coverage for :
Compiling separate contracts (compile command upgrade)
Deploying contracts based on new artifact schema
Updated compiler outputSelection format