DEV Community

Daniel Ioni
Daniel Ioni

Posted on

πŸš€ I Built an NFT Template for Tari (Monero Sidechain) – Here's How

-

πŸš€ I Built an NFT Template for Tari (Monero Sidechain)

After months of experimentation, I finally built a complete NFT template for Tari – the privacy‑by‑default sidechain of Monero.

Why Tari?

I started with Mordinals (NFTs inscribed directly on Monero), but the community pushed back due to privacy concerns. Tari is the official solution: a merge‑mined sidechain built by ex‑Monero maintainers, with privacy built in from the start.

What I Built

A Rust template that allows anyone to:

  • βœ… Create an NFT collection – new(name, symbol)
  • βœ… Mint NFTs – mint(id, immutable_data, mutable_data)
  • βœ… Store immutable metadata (e.g., image URL)
  • βœ… Store mutable metadata (e.g., current state)

The template compiles to WASM and is ready to be deployed on the Tari network.

πŸ¦€ The Code (Rust)

The core logic is simple and clean:


rust
pub fn new(name: String, symbol: String) -> Component<Self> {
    let nft_resource = ResourceBuilder::non_fungible()
        .metadata("name", name.clone())
        .metadata("symbol", symbol.clone())
        .metadata("description", "Una collezione NFT su Tari")
        .build();

    let vault = Vault::new_empty(nft_resource);
    // ...
}

pub fn mint(&mut self, id: NonFungibleId, immutable_data: String, mutable_data: String) -> Bucket {
    let manager = self.nft_vault.get_resource_manager();
    let nft_bucket = manager.mint_non_fungible(
        id.clone(),
        &metadata! { "immutable" => immutable_data, "minted_at" => "2026-07-19" },
        &mutable_data,
    );
    // ...
}
🐳 Dockerized & Published

To make it easy to use and deploy, I containerized the whole thing:
dockerfile

FROM rust:1.97 AS builder
WORKDIR /app
COPY . .
RUN rustup target add wasm32-unknown-unknown
RUN cargo build --release --target=wasm32-unknown-unknown

FROM debian:bookworm-slim
WORKDIR /app
COPY --from=builder /app/target/wasm32-unknown-unknown/release/*.wasm .
CMD ["ls", "-la"]

The image is publicly available on Docker Hub:
bash

docker pull myzubster/tari-nft-template:latest

πŸ“¦ How to Use It
Clone the repository
bash

git clone https://github.com/DanielIoni-creator/tari-nft-template.git
cd tari-nft-template

Build locally (Rust)
bash

cargo build

Build the Docker image
bash

docker build -t tari-nft-template .

Extract the WASM file (for Tari deploy)
bash

docker create --name temp myzubster/tari-nft-template:latest
docker cp temp:/app/my_first_nft.wasm .
docker rm temp

πŸ”— Links

    GitHub: DanielIoni-creator/tari-nft-template

    Docker Hub: myzubster/tari-nft-template

    Dev.to (previous article): NFTs on Monero in 2026: Goodbye Mordinals, Welcome Tari

πŸš€ Next Steps

    Deploy the template on the Tari mainnet using tari-ootle-cli

    Build a frontend (React + tari.js) to interact with the NFT collection

    Add royalty and whitelist features to the template

πŸ’¬ Let's Discuss

If you're a Rust or blockchain developer interested in Tari, Monero, or private NFTs – let's connect! Drop a comment below or reach out on Twitter or LinkedIn.

The code is open source. Fork it, star it, and build something amazing! ⭐

#Monero #Tari #NFT #Rust #Docker #Blockchain #Privacy
Enter fullscreen mode Exit fullscreen mode

Top comments (0)