I've installed sui a while back. How can I update sui and the Sui CLI that is the terminal client to the latest version? I'm receiving the following error when I try to publish code to the Sui chain.
[warn] Client/Server api version mismatch, client api version : 1.9.0, server api version : 1.10.0
To update the Sui CLI, follow these steps:
Make sure you have the latest version of Rust installed.
Run the following command:
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
This will update the Sui CLI to the latest version.
Note: If you are using a different branch of the Sui repository, you will need to update the branch name in the cargo install command accordingly.
Once you have updated the Sui CLI, you can verify that you have the latest version by running the following command:
sui --version
This should output the version number of the Sui CLI that is currently installed.