Skip to content

Latest commit

 

History

History
127 lines (88 loc) · 3.87 KB

File metadata and controls

127 lines (88 loc) · 3.87 KB

Tari Ootle CLI

CI Build Status Crates.io docs.rs Docs

The Tari CLI is the development tool for building and publishing smart contract templates on the Tari Ootle Layer-2 network.

Quick Start

Install

cargo install tari-ootle-cli

Requires the WASM target:

rustup target add wasm32-unknown-unknown

Create a template

tari create my-token

You'll be prompted to pick a starter template. This scaffolds a crate with build.rs and metadata configuration ready to go.

Build

cd my-token
tari build
# ✅ WASM binary: target/.../my_token.wasm (42.3 KB)
# 📄 Metadata:    target/.../template_metadata.cbor

Inspect metadata

tari metadata inspect

#   Name:           my-token
#   Version:        0.1.0
#   Tags:           token, defi
#   Category:       token
#   Logo URL:       https://example.com/logo.png
#   Metadata hash:  ...

Publish to network

tari publish -a myaccount

# ✅ WASM size: 42.3 KB
# 🔑 Metadata hash: ...
# ⭐ Your new template's address: template_f807989828e70a...

Publish metadata to community server

# Hash-verified (template must have been published with metadata hash)
tari metadata publish -t template_f807989828e70a...

# Author-signed (signs via wallet daemon, no secret keys in the CLI)
tari metadata publish -t template_f807989828e70a... --signed

Commands

Command Description
tari create [NAME] Create a new template crate (interactive if name omitted)
tari build [PATH] Build the WASM binary
tari publish [PATH] Publish template to the network
tari template init Set up metadata generation in an existing crate
tari template inspect Inspect built metadata
tari metadata publish Publish metadata to a community server
tari metadata inspect Inspect built metadata (alias)
tari config init/set/get/show Manage project configuration

Run tari --help or tari <command> --help for full details.

Configuration

Project config lives in tari.config.toml (created by tari config init or the wizard) and is organised by network:

default-network = "esmeralda"
# default-account = "myaccount"

[networks.esmeralda]
wallet-daemon-url = "http://127.0.0.1:5100/json_rpc"
metadata-server-url = "https://ootle-templates-esme.tari.com/"

[networks.localnet]
wallet-daemon-url = "http://127.0.0.1:5100/json_rpc"
metadata-server-url = "http://localhost:3000/"

Pass -n/--network <name> to override the active network on any command (e.g. tari --network localnet publish).

Settings are resolved: CLI flag > project config > global config > default.

See the Configuration Schema Reference for all options.

Documentation

Full documentation is available at tari-project.github.io/tari-cli.

Prerequisites

  • Tari Wallet Daemon running and accessible
  • Rust toolchain with wasm32-unknown-unknown target

License

BSD-3-Clause. See LICENSE.