This CLI tool is the starting point for the development of Tari templates (smart contracts in other blockchains).
cargo install tari-cli --git https://github.com/tari-project/tari-cli --force
You can download latest binary from Releases page.
- A locally running Tari Ootle Wallet Daemon.
- Properly configured project (worth checking after creating a new one) pointing to the right wallet daemon JSON-RPC
URL (in
project_dir/tari.config.toml
).- Example:
[networks.local] wallet-daemon-jrpc-address = "http://127.0.0.1:12009/"
- Example:
-
After installation of the latest version it is recommended to create a new project:
tari create YOUR_PROJECT_NAME
Example output:
$ tari create test [11:26:24] ✅ Init configuration and directories ✅ Refresh project templates repository ✅ Refresh wasm templates repository ✅ Collecting available project templates 🔎 Select project template: Basic - The basic project template to get started on wasm template development. ⠋ Generate new project[1/5] ⠁ ✅ Generate new project
Please note that currently this will create a new skeleton project which contains configuration and everything to create any new Tari template/smart contract project!
-
Create new template
tari new YOUR_TEMPLATE_PROJECT_NAME
Example output:
$ tari new SomeNFT [11:30:48] ✅ Init configuration and directories ✅ Refresh project templates repository ✅ Refresh wasm templates repository ✅ Collecting available WASM templates 🔎 Select WASM template: NFT - A simple NFT template to create your own. ⠋ Generate new project[ 1/10] ⠁ ✅ Generate new project ✅ Update Cargo.toml
-
Deploy new template
Important: You should have an account created with enough funds to deploy!
tari deploy --account YOUR_ACCOUNT_NAME_OR_ADDRESS YOUR_TEMPLATE_PROJECT_NAME
Example output:
tari deploy --account acc some_nft [11:50:43] ✅ Init configuration and directories ✅ Refresh project templates repository ✅ Refresh wasm templates repository ✅ Building WASM template project "some_nft" ❓Deploying this template costs 256875 XTR (estimated), are you sure to continue? yes ✅ Deploying project "some_nft" to local network ⭐ Your new template's address: f807989828e70a18050e5785f30a7bd01475797d76d6b4700af175b859c32774