-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add decode
command for event, message and constructor data decoding
#481
Conversation
save: +output tuned +decoder for message data and specifier of type to DecodeCommand removed redundant args to decode cmd
This reverts commit 1375fee.
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.
Looks good, just a couple of nitpicks, and also we need to add constructor
decoding
Co-authored-by: Andrew Jones <[email protected]>
decode
command for event and message data decodingdecode
command for event, message and constructor data decoding
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.
LGTM
6bbb976
to
49e04e5
Compare
src/cmd/decode.rs
Outdated
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 | ||
} |
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 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.
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.
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.
As a response to user feature request (e.g. like in this StackExchange question):