Fix the instantiate command for Substrate 0.9.42-based chains#1564
Fix the instantiate command for Substrate 0.9.42-based chains#1564
Conversation
| pub result: R, | ||
| /// The events that were emitted during execution. It is an option as event | ||
| /// collection is optional. | ||
| pub events: Option<Vec<EventRecord>>, |
There was a problem hiding this comment.
What about chains that still have the events field?
There was a problem hiding this comment.
we do not use it in our code, so it is just not decoded from binary data.
There was a problem hiding this comment.
Where do the events depicted after calling/instantiating/etc. come from if not the ContractResult?
There was a problem hiding this comment.
They are read from the block, please take a look at subxt function:
wait_for_success https://github.com/paritytech/subxt/blob/a0cb14aa4f5e60c9c88d7adea08a7dd6f0a6a22e/subxt/src/tx/tx_progress.rs#L264
CHANGELOG.md
Outdated
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - Add `cargo contract storage --version` command - [#1546](https://github.com/paritytech/cargo-contract/pull/1564) |
There was a problem hiding this comment.
There is already an Added section :).
CHANGELOG.md
Outdated
| ## [Unreleased] | ||
|
|
||
| ### Fixed | ||
| - Fix the `instantiate` command for Substrate `0.9.42` based chains - [#1546](https://github.com/paritytech/cargo-contract/pull/1564) |
There was a problem hiding this comment.
| - Fix the `instantiate` command for Substrate `0.9.42` based chains - [#1546](https://github.com/paritytech/cargo-contract/pull/1564) | |
| - Fix the `instantiate` command for Substrate `0.9.42` based chains - [#1564](https://github.com/paritytech/cargo-contract/pull/1564) |
| ); | ||
| if self.version { | ||
| println!("{}", storage_layout.version().await?); | ||
| Ok(()) |
There was a problem hiding this comment.
Please return early here to save us from the else indentation.
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
Summary
Closes #1563
inkorpallet-contracts?Description
Fix instantiate command
Add
cargo contract storage --versioncommandChecklist before requesting a review
CHANGELOG.md