-
Notifications
You must be signed in to change notification settings - Fork 119
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
Relates to #727 Print formatted contract build info #1136
Closed
Closed
Conversation
This file contains 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
to gitignore
ltfschoen
requested review from
cmichi,
ascjones,
HCastano and
SkymanOne
as code owners
May 30, 2023 17:48
ascjones
requested changes
Jun 5, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm closing the PR due to staleness and the |
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.
Proposed changes
This PR relates to issue #727.
So far it generates an array of hashmaps for each contract that is generated, and if it has generated one with the same contract name before it overwrites the existing hashmap and stores it in a JSON file build_info.json in the project root that is in the .gitignore file. it could be stored pretty using
serde_json::to_string_pretty(...).unwrap(),
or similar.The user can:
cargo run -p cargo-contract contract summary --output-build-info-json
to output the contents of the file to the terminal in JSON format (or justcargo contract summary --output-build-info-json
if they have cargo contract installed), or;cargo run -p cargo-contract contract summary
to output it in Table tabular format (or justcargo contract summary
if they have cargo contract installed)The outputs are also output to the terminal when a contract is built
Usage
Run a substrate-contracts-node on ws://127.0.0.1:9944 (e.g. this codebase allows you to run it in a Docker container https://github.com/ltfschoen/InkTemplate, and if necessary delete the chain db and restart the node by running
docker exec -it ink /app/docker/reset.sh
)Run the following to build a Flipper contract after running
https://github.com/paritytech/cargo-contract && cd cargo-contract
:ERROR: Unable to execute build of the smart contract