-
π 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
Top comments (0)