Skip to content
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

Non-JSON output after calling instantiate with --output-json #823

Closed
HCastano opened this issue Nov 15, 2022 · 0 comments · Fixed by #839
Closed

Non-JSON output after calling instantiate with --output-json #823

HCastano opened this issue Nov 15, 2022 · 0 comments · Fixed by #839
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@HCastano
Copy link
Contributor

If you call cargo contract instantiate with --output json there are a couple of
lines at the top of the output which a) aren't JSON and b) shouldn't be there.

# In the ink! repository
cargo contract build --manifest-path ./examples/flipper/Cargo.toml
cargo contract instantiate \
    --manifest-path ./examples/flipper/Cargo.toml \
    --suri //Alice --output-json \
    --constructor default \
    --salt $(date +%s) \
    --skip-confirm > /tmp/deployment-output.json

Results in the following output:

    Success! Gas required estimated at 290067161
{
  "contract": "5FemE98T9GNHMqaJbmmF4NtFzfugRmzJWqvjWUpSpEniufEp",
  "code_hash": "0xc076912767f384703fae885ce7c809182c29e767ed67164e1b24d82864d77dcb",
  "events": [
    {
      "pallet": "Balances",
      "name": "Withdraw",
      "fields": [ ... ]
    }]

    ...
}

The Success! ... line should be removed.

Tested with cargo-contract@3e24722.

@HCastano HCastano added bug Something isn't working good first issue Good for newcomers labels Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant