It is good practice to review the possible arguments of each command before you execute them. You can do this by passing the --help argument. Example: supra move tool publish --help
For the latest RPC URL, please refer to the page.
1
Compile your package
You do not need to pass the --package-dir command if your current working directory is the root of your package where the Move.toml file is located.
Compiling your package will fetch any dependencies defined in your Move.toml file before building your package. A new directory named build will be created storing the bytecode and sources for your package.
supra move tool compile --package-dir /supra/configs/move_workspace/exampleContract
2
Get Testnet Supra from the faucet
Note that CLI commands will be executed from the currently activated profile within your CLI. If you want to execute the command from a different profile, you can pass the --profile argument or you can activate a different profile with supra key activate-profile accountB.
To publish our package, we will need some gas. Obtain some Testnet gas from the faucet to proceed. Testnet tokens do not hold any monetary value.
supra move account fund-with-faucet --url https://rpc-testnet.supra.com
Note, there is no facuet for Mainnet. If you are looking to deploy on Mainnet, you will have to obtain Supra separately.
3
Deploy your package
Once your package is compiled and you have tokens to cover the gas, execute the following command to publish your package to the network.
supra move tool publish --package-dir /supra/configs/move_workspace/exampleContract --url https://rpc-testnet.supra.com