-
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 --binary
flag for info
command
#1311
Conversation
Co-authored-by: Michael Müller <mich@elmueller.net>
Co-authored-by: Michael Müller <mich@elmueller.net>
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 the small nitpick about the return type and a question.
Also please update the description with "Closes #800", so we know which issue is being dealt with and it closes automatically when this is merged.
crates/extrinsics/src/lib.rs
Outdated
pub async fn fetch_wasm_code( | ||
hash: CodeHash, | ||
client: &Client, | ||
) -> Result<Option<BoundedVec<u8>>> { |
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.
Should convert the BoundedVec
to a Vec
for the return type: better not to expose types generated by subxt in the public api of this crate.
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.
Done
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!
Closes #800
The combination --binary and --output-json returns JSON:
I assumed that binary flag is a behaviour switch, and output-json just formatter.
The another option is to combine wasm hex code with the rest of info command default content:
I think that cleaner approach is the first one, where --binary is treated as behaviour switch