NEAR CLI 3.0.0 Released
Our command-line interface tool just got a new major version release that introduced some big changes. NEAR’s DevRel team would like to take a moment to go over these changes to not only show you the changelog but explain why these changes were made. This is a new initiative to give our developer community an insight into our decision-making process as well as a better understanding of how NEAR works.
Deployment changes
– near deploy now warns users if there is an existing contract deployed. (PR #883)
near deploy (used for deploying smart contracts to a given account) now has an added prompt warning users if an existing contract has already been deployed. NEAR accounts can only have one contract deployed per account, but we frequently saw developers would accidentally overwrite existing contracts, especially when first onboarding to our platform. This prompt should help folks understand the singular contract concept and mitigate any accidental state changes to existing smart contracts.
Access Keys changes
– near delete-key now prompts for confirmation of key deletion. (PR #890)
Similar to the near deploy update, near delete-key (used for deleting an access key from an account) now prompts users for confirmation of this action. It will also ask the user to make sure this key is not for a recovery method. In addition, if you are deleting the last full-access key it will give a second prompt warning the user that this will fully lock the account/contract. Deleting all full-access keys will disable the ability to recover access to an account and should have an extra warning layer to prevent an accidental ownership lockout.
New flags
– `-f, –force` flags added to override warning prompts. (PR #890)
The two big changes introduced with this CLI release are only new for those who are already using scripts to run the above commands (deploy and delete-key). For those who want to upgrade to NEAR CLI 3.0.0 and still use scripting for these commands, we have added the -f or –force flags to override the warning prompts.
NEAR-CLI 3.0.0 Official Changelog
Share this:
Join the community:
Follow NEAR:
More posts from our blog
NEAR Lights Up Singapore: Leading the Charge in AI & Web3 at Token2049