diff --git a/crates/torii/client/src/client/mod.rs b/crates/torii/client/src/client/mod.rs index a79ba11ac5..6f231a447a 100644 --- a/crates/torii/client/src/client/mod.rs +++ b/crates/torii/client/src/client/mod.rs @@ -71,7 +71,7 @@ impl Client { // TODO: change this to querying the gRPC url instead let subbed_models = subbed_models.models_keys.read().clone(); for keys in subbed_models { - let model_reader = world_reader.model(&keys.model).await?; + let model_reader = world_reader.model_reader(&keys.model).await?; let values = model_reader.entity_storage(&keys.keys).await?; client_storage.set_model_storage( @@ -137,7 +137,7 @@ impl Client { }; if !self.subscribed_models.is_synced(keys) { - let model = self.world_reader.model(&keys.model).await?; + let model = self.world_reader.model_reader(&keys.model).await?; return Ok(Some(model.entity(&keys.keys).await?)); } @@ -232,7 +232,7 @@ impl Client { } async fn initiate_model(&self, model: &str, keys: Vec) -> Result<(), Error> { - let model_reader = self.world_reader.model(model).await?; + let model_reader = self.world_reader.model_reader(model).await?; let values = model_reader.entity_storage(&keys).await?; self.storage.set_model_storage( cairo_short_string_to_felt(model).map_err(ParseError::CairoShortStringToFelt)?, diff --git a/crates/torii/core/src/engine.rs b/crates/torii/core/src/engine.rs index 6f4724e7c5..55e6a57114 100644 --- a/crates/torii/core/src/engine.rs +++ b/crates/torii/core/src/engine.rs @@ -178,7 +178,7 @@ impl<'db, P: Provider + Sync> Engine<'db, P> { let mut world_event = false; for (event_idx, event) in invoke_receipt.events.iter().enumerate() { - if event.from_address != self.world.address() { + if event.from_address != self.world.address { continue; } diff --git a/crates/torii/core/src/processors/mod.rs b/crates/torii/core/src/processors/mod.rs index e8cb64da42..d503671b7d 100644 --- a/crates/torii/core/src/processors/mod.rs +++ b/crates/torii/core/src/processors/mod.rs @@ -14,7 +14,7 @@ pub mod store_transaction; #[async_trait] pub trait EventProcessor

where - P: Provider, + P: Provider + Sync, { fn event_key(&self) -> String; diff --git a/crates/torii/core/src/processors/register_model.rs b/crates/torii/core/src/processors/register_model.rs index 54b01f946d..1771605f6c 100644 --- a/crates/torii/core/src/processors/register_model.rs +++ b/crates/torii/core/src/processors/register_model.rs @@ -45,7 +45,7 @@ where ) -> Result<(), Error> { let name = parse_cairo_short_string(&event.data[0])?; - let model = world.model(&name).await?; + let model = world.model_reader(&name).await?; let schema = model.schema().await?; let layout = model.layout().await?;