tari template publish
Builds and publishes a template with its metadata hash anchored on-chain.
tari template publish [PATH] [OPTIONS]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
[PATH] | Path to the template crate directory (default: current directory) |
Options
Section titled “Options”| Option | Description |
|---|---|
-a, --account <ADDRESS|NAME> | Account for publishing fees |
-c, --custom-network <NAME> | Custom network name |
-y, --yes | Auto-confirm publishing |
-f, --max-fee <AMOUNT> | Maximum fee in microtari |
--binary <PATH> | Path to pre-compiled WASM binary |
Examples
Section titled “Examples”# Build and publish with metadata from current directorytari template publish
# Publish template at a specific pathtari template publish ./templates/my-token
# Auto-confirmtari template publish -y
# Publish with a specific accounttari template publish -a my-accountHow it works
Section titled “How it works”- Builds the WASM template (
cargo build --target wasm32-unknown-unknown --release) - Finds the metadata CBOR file in the build output (
target/.../build/<crate>/out/template_metadata.cbor) - Computes the metadata hash using domain-separated SHA-256
- Submits both the WASM binary and metadata hash to the wallet daemon
- Waits for the transaction to finalize and returns the template address
If no metadata CBOR is found, the template is published without a metadata hash (with a warning).