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

Show Gas consumption by default for dry-runs #1121

Merged
merged 2 commits into from
May 19, 2023

Conversation

AlexD10S
Copy link
Contributor

@AlexD10S AlexD10S commented May 19, 2023

Modify the output in cargo contract instantiate to show the gas consumed estimated when dry-run.
Fix the issue #1021

Output:
Screenshot 2023-05-19 at 15 57 17

@@ -467,6 +467,11 @@ impl InstantiateDryRunResult {
DEFAULT_KEY_COL_WIDTH
);
name_value_println!("Data", format!("{:?}", self.data), DEFAULT_KEY_COL_WIDTH);
name_value_println!(
"Gas limit",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Gas limit",
"Gas consumed",

It is true that this value is used for the gas limit for transactions. But it is still the Gas consumed by the dry-run. Does it fit with the max col width?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it still fits the width

@ascjones ascjones merged commit 0a307be into master May 19, 2023
@ascjones ascjones deleted the alexd10s/show-gas-consumption-dry-run branch May 19, 2023 15:28
This was referenced Jul 26, 2023
@smiasojed smiasojed mentioned this pull request Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants