Skip to content

Commit

Permalink
Add output-json check for instantiate command (#839)
Browse files Browse the repository at this point in the history
* add output-json check

* add CHANGELOG entry
  • Loading branch information
German authored Nov 23, 2022
1 parent c217202 commit b89f5e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
- Fixed having non-JSON output after calling `instantiate` with `--output-json` - [#839](https://github.com/paritytech/cargo-contract/pull/839/files)

## [2.0.0-beta] - 2022-11-22

This release supports the ink! [`v4.0.0-beta`](https://github.com/paritytech/ink/releases/tag/v4.0.0-beta) release.
Expand Down
4 changes: 3 additions & 1 deletion crates/cargo-contract/src/cmd/extrinsics/instantiate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ impl Exec {
let instantiate_result = self.instantiate_dry_run(code).await?;
match instantiate_result.result {
Ok(_) => {
super::print_gas_required_success(instantiate_result.gas_required);
if !self.output_json {
super::print_gas_required_success(instantiate_result.gas_required);
}
// use user specified values where provided, otherwise use the estimates
let ref_time = self
.args
Expand Down

0 comments on commit b89f5e0

Please sign in to comment.