-
Notifications
You must be signed in to change notification settings - Fork 73
fix: Fixed the inspection command for the global contract on the account. #513
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
Conversation
akorchyn
left a comment
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.
@race-of-sloths score 3
src/commands/contract/inspect/mod.rs
Outdated
| account_view.storage_usage | ||
| .checked_sub(u64::try_from(contract_code_view.code.len())?) | ||
| .expect("Unexpected error") | ||
| if account_view.global_contract_account_id.is_none() & account_view.global_contract_hash.is_none() { |
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.
Maybe we can somehow omit those view_code_response and fetch data only if necessary.
I see that it is provided as an argument, but can you take a look if it is possible to move this calculation here if it is not mandatory there.
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 (519c98e)
|
@FroVolod Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: staleThis pull request was removed from the race, but you can include it again with What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
❌ PR inactiveThis PR has been inactive for two weeks. It's now marked as stale. Tip If you think it's a mistake, you can restart the bot with |
## 🤖 New release * `near-cli-rs`: 0.22.1 -> 0.22.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.22.2](v0.22.1...v0.22.2) - 2025-08-31 ### Fixed - Fixed the inspection command for the global contract on the account. ([#513](#513)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
## 🤖 New release * `near-cli-rs`: 0.22.1 -> 0.22.2 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.22.2](near/near-cli-rs@v0.22.1...v0.22.2) - 2025-08-31 ### Fixed - Fixed the inspection command for the global contract on the account. ([#513](near/near-cli-rs#513)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
Resolves #512