diff --git a/crates/torii/core/src/processors/metadata_update.rs b/crates/torii/core/src/processors/metadata_update.rs index a25d02f535..9bfea3e905 100644 --- a/crates/torii/core/src/processors/metadata_update.rs +++ b/crates/torii/core/src/processors/metadata_update.rs @@ -4,7 +4,7 @@ use anyhow::{Error, Result}; use async_trait::async_trait; use base64::engine::general_purpose; use base64::Engine as _; -use cainome::cairo_serde::{ByteArray, CairoSerde}; +use cainome::cairo_serde::{ByteArray, CairoSerde, Zeroable}; use dojo_world::contracts::world::WorldContractReader; use dojo_world::metadata::{Uri, WorldMetadata}; use reqwest::Client; @@ -68,9 +68,13 @@ where let db = db.clone(); let resource = *resource; - tokio::spawn(async move { - try_retrieve(db, resource, uri_str).await; - }); + + // Only retrieve metadata for the World contract. + if resource.is_zero() { + tokio::spawn(async move { + try_retrieve(db, resource, uri_str).await; + }); + } Ok(()) }