Add decode command for event, message and constructor data decoding#481
Merged
Add decode command for event, message and constructor data decoding#481
decode command for event, message and constructor data decoding#481Conversation
save: +output tuned +decoder for message data and specifier of type to DecodeCommand removed redundant args to decode cmd
This reverts commit 1375fee.
ascjones
reviewed
Mar 30, 2022
ascjones
reviewed
Mar 31, 2022
ascjones
reviewed
Apr 7, 2022
ascjones
reviewed
Apr 7, 2022
Collaborator
ascjones
left a comment
There was a problem hiding this comment.
Looks good, just a couple of nitpicks, and also we need to add constructor decoding
Co-authored-by: Andrew Jones <ascjones@gmail.com>
ascjones
reviewed
Apr 7, 2022
decode command for event and message data decodingdecode command for event, message and constructor data decoding
6bbb976 to
49e04e5
Compare
athei
reviewed
Apr 12, 2022
src/cmd/decode.rs
Outdated
Comment on lines
+75
to
+79
| fn cargo_contract(path: &Path) -> assert_cmd::Command { | ||
| let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap(); | ||
| cmd.current_dir(path).arg("contract"); | ||
| cmd | ||
| } |
Contributor
There was a problem hiding this comment.
I think you need to compile cargo contract here. So you essentially want to run cargo run --release -- <args> here. You can get the correct directory where to run it by reading CARGO_MANIFEST_PATH env var.
Collaborator
There was a problem hiding this comment.
Seems that assert_cmd assumes it is an integration test (therefore the binary would already have been built).
I've moved this test to integration test to see if it works now.
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.
As a response to user feature request (e.g. like in this StackExchange question):