diff --git a/Cargo.lock b/Cargo.lock index 64e749a5c3..7e76a4a884 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13455,14 +13455,17 @@ dependencies = [ "ipfs-api-backend-hyper", "katana-runner", "num-traits 0.2.19", + "scarb", "serde", "serde_json", "serde_with 3.9.0", + "sozo-scarbext", "sozo-walnut", "spinoff", "starknet 0.12.0", "starknet-crypto 0.7.2", "thiserror", + "tokio", "toml 0.8.19", "tracing", ] diff --git a/bin/sozo/src/commands/migrate.rs b/bin/sozo/src/commands/migrate.rs index 08ab0abafc..30e32c4408 100644 --- a/bin/sozo/src/commands/migrate.rs +++ b/bin/sozo/src/commands/migrate.rs @@ -48,7 +48,7 @@ impl MigrateArgs { config.tokio_handle().block_on(async { print_banner(&ws, &starknet).await?; - let mut spinner = MigrationUi::new("Evaluating world diff..."); + let mut spinner = MigrationUi::new(Some("Evaluating world diff...")); let (world_diff, account, rpc_url) = utils::get_world_diff_and_account( account, diff --git a/bin/sozo/tests/test_data/policies.json b/bin/sozo/tests/test_data/policies.json index 86f69297ee..95e4dd9f94 100644 --- a/bin/sozo/tests/test_data/policies.json +++ b/bin/sozo/tests/test_data/policies.json @@ -32,7 +32,7 @@ "method": "upgrade" }, { - "target": "0x79e0653fbebdbdb864ca69d1470b263f2efdfce9cf355cfe9c7719627eff792", + "target": "0x200cd8070a7dbe0894c74426d2f4c9d778b13042ce955203cb189d85cfb43d1", "method": "upgrade" }, { diff --git a/crates/dojo/world/src/remote/events_to_remote.rs b/crates/dojo/world/src/remote/events_to_remote.rs index c85834eefe..c4c30883df 100644 --- a/crates/dojo/world/src/remote/events_to_remote.rs +++ b/crates/dojo/world/src/remote/events_to_remote.rs @@ -186,7 +186,7 @@ impl WorldRemote { resource.push_class_hash(e.class_hash.into()); } WorldEvent::ContractInitialized(e) => { - // Unwrap is safe bcause the contract must exist in the world. + // Unwrap is safe because the contract must exist in the world. let resource = self.resources.get_mut(&e.selector).unwrap(); let contract = resource.as_contract_mut()?; contract.is_initialized = true; diff --git a/crates/sozo/ops/Cargo.toml b/crates/sozo/ops/Cargo.toml index 24dc70eb32..efe897d1a0 100644 --- a/crates/sozo/ops/Cargo.toml +++ b/crates/sozo/ops/Cargo.toml @@ -36,6 +36,9 @@ dojo-test-utils = { workspace = true, features = [ "build-examples" ] } ipfs-api-backend-hyper = { git = "https://github.com/ferristseng/rust-ipfs-api", rev = "af2c17f7b19ef5b9898f458d97a90055c3605633", features = [ "with-hyper-rustls" ] } katana-runner.workspace = true dojo-types.workspace = true +tokio.workspace = true +scarb.workspace = true +sozo-scarbext.workspace = true [features] test-utils = [ "dep:dojo-test-utils", "dep:katana-runner" ] diff --git a/crates/sozo/ops/src/migrate/mod.rs b/crates/sozo/ops/src/migrate/mod.rs index abb28ee72b..401db9e7cd 100644 --- a/crates/sozo/ops/src/migrate/mod.rs +++ b/crates/sozo/ops/src/migrate/mod.rs @@ -204,17 +204,15 @@ where let has_changed = !invoker.calls.is_empty(); - if !ordered_init_calls.is_empty() { + if !invoker.calls.is_empty() { if self.do_multicall() { - let ui_text = format!("Initializing {} contracts...", ordered_init_calls.len()); + let ui_text = format!("Initializing {} contracts...", invoker.calls.len()); ui.update_text_boxed(ui_text); invoker.multicall().await?; } else { - let ui_text = format!( - "Initializing {} contracts (sequentially)...", - ordered_init_calls.len() - ); + let ui_text = + format!("Initializing {} contracts (sequentially)...", invoker.calls.len()); ui.update_text_boxed(ui_text); invoker.invoke_all_sequentially().await?; diff --git a/crates/sozo/ops/src/migration_ui.rs b/crates/sozo/ops/src/migration_ui.rs index ec94782b7c..498a1290a3 100644 --- a/crates/sozo/ops/src/migration_ui.rs +++ b/crates/sozo/ops/src/migration_ui.rs @@ -20,10 +20,16 @@ impl fmt::Debug for MigrationUi { impl MigrationUi { /// Returns a new instance with the default frames. - pub fn new(text: &'static str) -> Self { - let frames = spinner!(["⛩ī¸ ", "🎃", "đŸ‘ģ", "🧟", "💀"], 500); - let spinner = Spinner::new(frames.clone(), text, None); - Self { spinner, default_frames: frames, silent: false } + pub fn new(text: Option<&'static str>) -> Self { + if let Some(text) = text { + let frames = spinner!(["⛩ī¸ ", "🎃", "đŸ‘ģ", "🧟", "💀"], 500); + let spinner = Spinner::new(frames.clone(), text, None); + Self { spinner, default_frames: frames, silent: false } + } else { + let frames = spinner!([""], 5000); + let spinner = Spinner::new(frames.clone(), "", None); + Self { spinner, default_frames: frames, silent: false } + } } /// Returns a new instance with the silent flag set. diff --git a/crates/sozo/ops/src/tests/migration.rs b/crates/sozo/ops/src/tests/migration.rs index cdfa44d93b..9551dd22ca 100644 --- a/crates/sozo/ops/src/tests/migration.rs +++ b/crates/sozo/ops/src/tests/migration.rs @@ -1,620 +1,79 @@ #![allow(dead_code)] -use std::str::{self, FromStr}; +use std::sync::Arc; -use cainome::cairo_serde::ContractAddress; -use camino::Utf8Path; -use dojo_test_utils::migration::prepare_migration_with_world_and_seed; +use anyhow::Result; +use dojo_test_utils::compiler::CompilerTestSetup; +use dojo_test_utils::migration::copy_spawn_and_move_db; use dojo_utils::TxnConfig; -use dojo_world::contracts::naming::{compute_bytearray_hash, compute_selector_from_tag}; -use dojo_world::contracts::{WorldContract, WorldContractReader}; -use dojo_world::manifest::{ - BaseManifest, DeploymentManifest, OverlayManifest, BASE_DIR, MANIFESTS_DIR, OVERLAYS_DIR, - WORLD_CONTRACT_TAG, -}; -use dojo_world::metadata::{ - dojo_metadata_from_workspace, get_default_namespace_from_ws, ArtifactMetadata, DojoMetadata, - WorldMetadata, IPFS_CLIENT_URL, IPFS_PASSWORD, IPFS_USERNAME, -}; -use dojo_world::migration::strategy::{prepare_for_migration, MigrationMetadata}; -use dojo_world::migration::world::WorldDiff; -use dojo_world::uri::Uri; -use futures::TryStreamExt; -use ipfs_api_backend_hyper::{HyperBackend, IpfsApi, IpfsClient, TryFromUri}; +use dojo_world::contracts::WorldContract; +use dojo_world::diff::WorldDiff; use katana_runner::RunnerCtx; -use starknet::core::types::{BlockId, BlockTag, Felt}; -use starknet::macros::felt; +use scarb::compiler::Profile; +use sozo_scarbext::WorkspaceExt; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::JsonRpcClient; -use crate::auth::ResourceType; -use crate::migration::{ - auto_authorize, execute_strategy, find_authorization_diff, upload_metadata, -}; -use crate::test_utils::setup; -use crate::utils::get_contract_address_from_reader; +use crate::migrate::{Migration, MigrationResult}; +use crate::migration_ui::MigrationUi; -#[tokio::test(flavor = "multi_thread")] -#[katana_runner::test(accounts = 10)] -async fn default_migrate_no_dry_run(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); +/// Sets up the world diff from the environment and returns the world diff used to create a +/// migration. +async fn setup_migration( + example_project: &str, + profile: Profile, + provider: Arc>, +) -> Result { + let setup = CompilerTestSetup::from_examples("../../dojo/core", "../../../examples/"); + let config = setup.build_test_config(example_project, profile); - let mut account = sequencer.account(0); - account.set_block_id(BlockId::Tag(BlockTag::Pending)); - - let _ = crate::migration::migrate( - &ws, - None, - sequencer.url().to_string(), - account, - "dojo_examples", - false, - TxnConfig::init_wait(), - None, - ) - .await - .is_ok(); -} + let ws = scarb::ops::read_workspace(config.manifest_path(), &config).unwrap(); -#[tokio::test(flavor = "multi_thread")] -#[katana_runner::test(accounts = 10)] -async fn migrate_with_auto_mine(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); + let world_local = ws.load_world_local().unwrap(); + let world_address = world_local.deterministic_world_address().unwrap(); - let (migration, _) = setup::setup_migration(&config, "dojo_examples").unwrap(); + let world_diff = WorldDiff::new_from_chain(world_address, world_local, &provider).await?; - let mut account = sequencer.account(0); - account.set_block_id(BlockId::Tag(BlockTag::Pending)); - - let declarers = setup::get_declarers_from_sequencer(sequencer).await; - - execute_strategy(&ws, &migration, &account, TxnConfig::init_wait(), &declarers).await.unwrap(); + Ok(world_diff) } -#[tokio::test(flavor = "multi_thread")] -#[katana_runner::test(accounts = 10, block_time = 1000)] -async fn migrate_with_block_time(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); - - let (migration, _) = setup::setup_migration(&config, "dojo_examples").unwrap(); - - let mut account = sequencer.account(0); - account.set_block_id(BlockId::Tag(BlockTag::Pending)); - - let declarers = setup::get_declarers_from_sequencer(sequencer).await; - - execute_strategy(&ws, &migration, &account, TxnConfig::default(), &declarers).await.unwrap(); -} - -#[test] -fn metadata_calculated_properly() { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); - - let base = config.manifest_path().parent().unwrap(); - let target_dir = format!("{}/target/dev", base); - - let profile_name = ws.current_profile().unwrap().to_string(); - - let mut manifest = BaseManifest::load_from_path( - &base.to_path_buf().join(MANIFESTS_DIR).join(&profile_name).join(BASE_DIR), - ) - .unwrap(); - - let overlay_dir = base.join(OVERLAYS_DIR).join(&profile_name); - if overlay_dir.exists() { - let overlay_manifest = OverlayManifest::load_from_path(&overlay_dir, &manifest).unwrap(); - manifest.merge(overlay_manifest); - } - - let world = WorldDiff::compute(manifest, None, "dojo-test").unwrap(); - - let migration = prepare_for_migration( - None, - felt!("0x12345"), - &Utf8Path::new(&target_dir).to_path_buf(), - world, - ) - .unwrap(); - - // verifies that key name and actual item name are same - for (key, value) in migration.metadata.iter() { - match value { - MigrationMetadata::Contract(c) => { - assert_eq!(key, &c.tag); - } - } - } -} - -#[tokio::test] -#[katana_runner::test(accounts = 10)] -async fn migration_with_correct_calldata_second_time_work_as_expected(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); - - let base = config.manifest_path().parent().unwrap(); - let target_dir = format!("{}/target/dev", base); - +/// Migrates the spawn-and-move project from the local environment. +async fn migrate_spawn_and_move(sequencer: &RunnerCtx) -> MigrationResult { let account = sequencer.account(0); + let provider = Arc::new(JsonRpcClient::new(HttpTransport::new(sequencer.url()))); - let profile_name = ws.current_profile().unwrap().to_string(); - - let mut manifest = BaseManifest::load_from_path( - &base.to_path_buf().join(MANIFESTS_DIR).join(&profile_name).join(BASE_DIR), - ) - .unwrap(); - - let world = WorldDiff::compute(manifest.clone(), None, "dojo-test").unwrap(); - - let migration = prepare_for_migration( - None, - felt!("0x12345"), - &Utf8Path::new(&target_dir).to_path_buf(), - world, - ) - .unwrap(); - - let declarers = setup::get_declarers_from_sequencer(sequencer).await; - - let migration_output = - execute_strategy(&ws, &migration, &account, TxnConfig::init_wait(), &declarers) - .await - .unwrap(); - - let world_address = migration_output.world_address; - - let remote_manifest = DeploymentManifest::load_from_remote(sequencer.provider(), world_address) + let world_diff = setup_migration("spawn-and-move", Profile::DEV, provider) .await - .expect("Failed to load remote manifest"); - - let overlay_dir = base.join(OVERLAYS_DIR).join(profile_name); - if overlay_dir.exists() { - let overlay = OverlayManifest::load_from_path(&overlay_dir, &manifest) - .expect("Failed to load overlay"); + .expect("Failed to setup migration"); - // adding correct calldata - manifest.merge(overlay); - } - let default_namespace = get_default_namespace_from_ws(&ws).unwrap(); - - let world = WorldDiff::compute(manifest, Some(remote_manifest), &default_namespace) - .expect("failed to update order"); - - let migration = prepare_for_migration( - Some(world_address), - felt!("0x12345"), - &Utf8Path::new(&target_dir).to_path_buf(), - world, - ) - .unwrap(); - - let migration_output = - execute_strategy(&ws, &migration, &account, TxnConfig::init_wait(), &declarers) - .await - .unwrap(); - - assert!(migration_output.full); -} - -#[tokio::test] -#[katana_runner::test(accounts = 10)] -async fn migration_from_remote(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); + let world_address = world_diff.world_info.address; + let profile_config = world_diff.profile_config.clone(); - let base = config.manifest_path().parent().unwrap(); - let target_dir = format!("{}/target/dev", base); - - let account = sequencer.account(0); - - let profile_name = ws.current_profile().unwrap().to_string(); - - let manifest = BaseManifest::load_from_path( - &base.to_path_buf().join(MANIFESTS_DIR).join(&profile_name).join(BASE_DIR), - ) - .unwrap(); - - let world = WorldDiff::compute(manifest, None, "dojo-test").unwrap(); - - let migration = prepare_for_migration( - None, - felt!("0x12345"), - &Utf8Path::new(&target_dir).to_path_buf(), - world, - ) - .unwrap(); - - let declarers = setup::get_declarers_from_sequencer(sequencer).await; - - execute_strategy(&ws, &migration, &account, TxnConfig::init_wait(), &declarers).await.unwrap(); - - let local_manifest = BaseManifest::load_from_path( - &base.to_path_buf().join(MANIFESTS_DIR).join(&profile_name).join(BASE_DIR), - ) - .unwrap(); + let migration = Migration::new( + world_diff, + WorldContract::new(world_address, &account), + TxnConfig::init_wait(), + profile_config, + sequencer.url().to_string(), + ); - let remote_manifest = DeploymentManifest::load_from_remote( - JsonRpcClient::new(HttpTransport::new(sequencer.url())), - migration.world_address, - ) - .await - .unwrap(); + let mut ui = MigrationUi::new(None).with_silent(); - assert_eq!(local_manifest.world.inner.class_hash, remote_manifest.world.inner.class_hash); - assert_eq!(local_manifest.models.len(), remote_manifest.models.len()); + migration.migrate(&mut ui).await.expect("Migration spawn-and-move failed.") } #[tokio::test(flavor = "multi_thread")] #[katana_runner::test(accounts = 10)] -async fn migrate_with_metadata(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); - - let (migration, _) = setup::setup_migration(&config, "dojo_examples").unwrap(); - - let mut account = sequencer.account(0); - account.set_block_id(BlockId::Tag(BlockTag::Pending)); - - let declarers = setup::get_declarers_from_sequencer(sequencer).await; +async fn migrate_from_local(sequencer: &RunnerCtx) { + let MigrationResult { manifest, has_changes } = migrate_spawn_and_move(sequencer).await; - let output = execute_strategy(&ws, &migration, &account, TxnConfig::init_wait(), &declarers) - .await - .unwrap(); - - let res = upload_metadata(&ws, &account, output.clone(), TxnConfig::init_wait()).await; - assert!(res.is_ok()); - - let provider = sequencer.provider(); - let world_reader = WorldContractReader::new(output.world_address, &provider); - - let client = IpfsClient::from_str(IPFS_CLIENT_URL) - .unwrap_or_else(|_| panic!("Unable to initialize the IPFS Client")) - .with_credentials(IPFS_USERNAME, IPFS_PASSWORD); - - let dojo_metadata = - dojo_metadata_from_workspace(&ws).expect("No current package with dojo metadata found."); - - // check world metadata - let resource = world_reader.metadata(&Felt::ZERO).call().await.unwrap(); - let element_name = WORLD_CONTRACT_TAG.to_string(); - - let full_uri = resource.metadata_uri.to_string().unwrap(); - let resource_bytes = get_ipfs_resource_data(&client, &element_name, &full_uri).await; - - let metadata = resource_bytes_to_world_metadata(&resource_bytes, &element_name); - - assert_eq!(metadata.name, dojo_metadata.world.name, ""); - assert_eq!(metadata.description, dojo_metadata.world.description, ""); - assert_eq!(metadata.cover_uri, dojo_metadata.world.cover_uri, ""); - assert_eq!(metadata.icon_uri, dojo_metadata.world.icon_uri, ""); - assert_eq!(metadata.website, dojo_metadata.world.website, ""); - assert_eq!(metadata.socials, dojo_metadata.world.socials, ""); - - // TODO: uncomment when https://github.com/dojoengine/dojo/issues/2137 is fixed. - // check_artifact_fields( - // &client, - // &metadata.artifacts, - // &dojo_metadata.world.artifacts, - // &element_name, - // ) - // .await; - // check model metadata - // for m in migration.models { - // let selector = compute_selector_from_tag(&m.diff.tag); - // check_artifact_metadata(&client, &world_reader, selector, &m.diff.tag, &dojo_metadata) - // .await; - // } - // check contract metadata - // for c in migration.contracts { - // let contract_address = - // get_contract_address_from_reader(&world_reader, c.diff.tag.clone()).await.unwrap(); - // - // check_artifact_metadata( - // &client, - // &world_reader, - // contract_address, - // &c.diff.tag, - // &dojo_metadata, - // ) - // .await; - // } + assert!(has_changes); + assert_eq!(manifest.contracts.len(), 4); } #[tokio::test(flavor = "multi_thread")] -#[katana_runner::test(accounts = 10)] -async fn migrate_with_auto_authorize(sequencer: &RunnerCtx) { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); - - let (migration, diff) = setup::setup_migration(&config, "dojo_examples").unwrap(); - - let manifest_base = config.manifest_path().parent().unwrap(); - let mut manifest = - BaseManifest::load_from_path(&manifest_base.join(MANIFESTS_DIR).join("dev").join(BASE_DIR)) - .unwrap(); - - let overlay_dir = manifest_base.join(OVERLAYS_DIR).join("dev"); - if overlay_dir.exists() { - let overlay_manifest = OverlayManifest::load_from_path(&overlay_dir, &manifest).unwrap(); - manifest.merge(overlay_manifest); - } - - let mut account = sequencer.account(0); - account.set_block_id(BlockId::Tag(BlockTag::Pending)); - - let txn_config = TxnConfig::init_wait(); - - let declarers = setup::get_declarers_from_sequencer(sequencer).await; - - let output = execute_strategy(&ws, &migration, &account, txn_config, &declarers).await.unwrap(); - - let world_address = migration.world_address; - let world = WorldContract::new(world_address, account); - - let default_namespace = get_default_namespace_from_ws(&ws).unwrap(); - let (grant, revoke) = - find_authorization_diff(&config.ui(), &world, &diff, Some(&output), &default_namespace) - .await - .unwrap(); - - let res = auto_authorize( - &ws, - &world, - &txn_config, - &default_namespace, - &grant, - &revoke, - #[cfg(feature = "walnut")] - &None, - ) - .await; - assert!(res.is_ok()); - - let provider = sequencer.provider(); - let world_reader = WorldContractReader::new(output.world_address, &provider); - - // check contract metadata - for c in migration.contracts { - let contract_address = - get_contract_address_from_reader(&world_reader, c.diff.tag.clone()).await.unwrap(); - - let contract = manifest.contracts.iter().find(|a| a.inner.tag == c.diff.tag).unwrap(); - - for resource in &contract.inner.writes { - let resource_type = ResourceType::from_str(resource).unwrap(); - - let selector = match resource_type { - ResourceType::Model(tag) => compute_selector_from_tag(&tag), - ResourceType::Contract(tag) => compute_selector_from_tag(&tag), - ResourceType::Namespace(ns) => compute_bytearray_hash(&ns), - ResourceType::Selector(s) => s, - }; - - let contract_address = ContractAddress(contract_address); - let is_writer = - world_reader.is_writer(&selector, &contract_address).call().await.unwrap(); - assert!(is_writer); - } - } -} - -#[test] -fn migration_with_mismatching_world_address_and_seed() { - let config = setup::load_config(); - let ws = setup::setup_ws(&config); - - let base_dir = config.manifest_path().parent().unwrap().to_path_buf(); - let target_dir = base_dir.join("target").join("dev"); - - let default_namespace = get_default_namespace_from_ws(&ws).unwrap(); - - let (strategy, _) = prepare_migration_with_world_and_seed( - base_dir, - target_dir, - Some(Felt::ONE), - "sozo_test", - &default_namespace, - ) - .unwrap(); - - // The strategy.world has it's address set with the seed directly, and not - // from the world address provided by the user. - assert_ne!(strategy.world_address, strategy.world.unwrap().contract_address); -} - -/// Get the hash from a IPFS URI -/// -/// # Arguments -/// -/// * `uri` - a full IPFS URI -/// -/// # Returns -/// -/// A [`String`] containing the hash from the URI. -fn get_hash_from_uri(uri: &str) -> String { - let hash = match uri.strip_prefix("ipfs://") { - Some(s) => s.to_string(), - None => uri.to_owned(), - }; - match hash.strip_suffix('/') { - Some(s) => s.to_string(), - None => hash, - } -} - -/// Check a metadata field which refers to a file. -/// -/// # Arguments -/// -/// * `client` - a IPFS client. -/// * `uri` - the IPFS URI of the abi field. -/// * `expected_uri` - the URI of the expected file. -/// * `field_name` - the field name. -/// * `tag` - the tag of the element linked to this field. -async fn check_file_field( - client: &HyperBackend, - uri: &Uri, - expected_uri: &Uri, - field_name: String, - tag: &String, -) { - if let Uri::Ipfs(uri) = uri { - let resource_data = get_ipfs_resource_data(client, tag, uri).await; - assert!(!resource_data.is_empty(), "{field_name} IPFS artifact for {} is empty", tag); - - if let Uri::File(f) = expected_uri { - let file_content = std::fs::read_to_string(f).unwrap(); - let resource_content = std::str::from_utf8(&resource_data).unwrap_or_else(|_| { - panic!("Unable to stringify resource data for field '{}' of {}", field_name, tag) - }); - - assert!( - file_content.eq(&resource_content), - "local '{field_name}' content differs from the one uploaded on IPFS for {}", - tag - ); - } else { - panic!("The field '{field_name}' of {} is not a file (Should never happen !)", tag); - } - } else { - panic!("The '{field_name}' field is not an IPFS artifact for {}", tag); - } -} - -/// Convert resource bytes to a ArtifactMetadata object. -/// -/// # Arguments -/// -/// * `raw_data` - resource data as bytes. -/// * `tag` - tag of the element linked to this resource. -/// -/// # Returns -/// -/// A [`ArtifactMetadata`] object. -fn resource_bytes_to_metadata(raw_data: &[u8], tag: &String) -> ArtifactMetadata { - let data = std::str::from_utf8(raw_data) - .unwrap_or_else(|_| panic!("Unable to stringify raw metadata for {}", tag)); - serde_json::from_str(data) - .unwrap_or_else(|_| panic!("Unable to deserialize metadata for {}", tag)) -} - -/// Convert resource bytes to a WorldMetadata object. -/// -/// # Arguments -/// -/// * `raw_data` - resource data as bytes. -/// * `element_name` - name of the element linked to this resource. -/// -/// # Returns -/// -/// A [`WorldMetadata`] object. -fn resource_bytes_to_world_metadata(raw_data: &[u8], element_name: &String) -> WorldMetadata { - let data = std::str::from_utf8(raw_data) - .unwrap_or_else(|_| panic!("Unable to stringify raw metadata for {}", element_name)); - serde_json::from_str(data) - .unwrap_or_else(|_| panic!("Unable to deserialize metadata for {}", element_name)) -} - -/// Read the content of a resource identified by its IPFS URI. -/// -/// # Arguments -/// -/// * `client` - a IPFS client. -/// * `tag` - the tag of the element (model or contract) linked to this artifact. -/// * `uri` - the IPFS resource URI. -/// -/// # Returns -/// -/// A [`Vec`] containing the resource content as bytes. -async fn get_ipfs_resource_data(client: &HyperBackend, tag: &String, uri: &String) -> Vec { - let hash = get_hash_from_uri(uri); - - let res = client.cat(&hash).map_ok(|chunk| chunk.to_vec()).try_concat().await; - assert!(res.is_ok(), "Unable to read the IPFS artifact {} for {}", uri, tag); - - res.unwrap() -} - -/// Check the validity of artifact metadata fields. -/// -/// # Arguments -/// -/// * `client` - a IPFS client. -/// * `metadata` - the metadata to check. -/// * `expected_metadata` - the metadata values coming from local Dojo metadata. -/// * `tag` - the tag of the element linked to this metadata. -async fn check_artifact_fields( - client: &HyperBackend, - metadata: &ArtifactMetadata, - expected_metadata: &ArtifactMetadata, - tag: &String, -) { - println!("metadata {:?}", metadata); - println!("expected_metadata {:?}", expected_metadata); - - assert!(metadata.abi.is_some(), "'abi' field not set for {}", tag); - let abi = metadata.abi.as_ref().unwrap(); - let expected_abi = expected_metadata.abi.as_ref().unwrap(); - check_file_field(client, abi, expected_abi, "abi".to_string(), tag).await; - - // For now source are not expended, uncomment when https://github.com/dojoengine/dojo/issues/2137 is fixed. - // assert!(metadata.source.is_some(), "'source' field not set for {}", tag); - // let source = metadata.source.as_ref().unwrap(); - // let expected_source = expected_metadata.source.as_ref().unwrap(); - // check_file_field(client, source, expected_source, "source".to_string(), tag).await; -} - -/// Check the validity of a IPFS artifact metadata. -/// -/// # Arguments -/// -/// * `client` - a IPFS client. -/// * `tag` - the tag of the element linked to the artifact. -/// * `uri` - the full metadata URI. -/// * `expected_metadata` - the expected metadata values coming from local Dojo metadata. -async fn check_ipfs_metadata( - client: &HyperBackend, - tag: &String, - uri: &String, - expected_metadata: &ArtifactMetadata, -) { - let resource_bytes = get_ipfs_resource_data(client, tag, uri).await; - let metadata = resource_bytes_to_metadata(&resource_bytes, tag); - - check_artifact_fields(client, &metadata, expected_metadata, tag).await; -} - -/// Check an artifact metadata read from the resource registry against its value -/// in the local Dojo metadata. -/// -/// # Arguments -/// -/// * `client` - a IPFS client. -/// * `world_reader` - a world reader object. -/// * `resource_id` - the resource ID in the resource registry. -/// * `tag` - the tag of the element linked to this metadata. -/// * `dojo_metadata` - local Dojo metadata. -async fn check_artifact_metadata( - client: &HyperBackend, - world_reader: &WorldContractReader

, - resource_id: Felt, - tag: &String, - dojo_metadata: &DojoMetadata, -) { - let resource = world_reader.metadata(&resource_id).call().await.unwrap(); - - let expected_resource = dojo_metadata.resources_artifacts.get(tag); - assert!(expected_resource.is_some(), "Unable to find local artifact metadata for {}", tag); - let expected_resource = expected_resource.unwrap(); - - check_ipfs_metadata( - client, - tag, - &resource.metadata_uri.to_string().unwrap(), - &expected_resource.artifacts, - ) - .await; +#[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())] +async fn migrate_no_change(sequencer: &RunnerCtx) { + let MigrationResult { manifest, has_changes } = migrate_spawn_and_move(sequencer).await; + assert!(!has_changes); + assert_eq!(manifest.contracts.len(), 4); } diff --git a/crates/sozo/ops/src/tests/mod.rs b/crates/sozo/ops/src/tests/mod.rs index c003cebd88..9b27936812 100644 --- a/crates/sozo/ops/src/tests/mod.rs +++ b/crates/sozo/ops/src/tests/mod.rs @@ -1,6 +1,7 @@ // TODO: // mod auth; // mod call; -// mod migration; // mod model; // mod utils; + +mod migration; diff --git a/crates/torii/core/src/sql/test.rs b/crates/torii/core/src/sql/test.rs index 45a29a5afe..fd1539b49c 100644 --- a/crates/torii/core/src/sql/test.rs +++ b/crates/torii/core/src/sql/test.rs @@ -183,9 +183,8 @@ async fn test_load_from_remote(sequencer: &RunnerCtx) { assert_eq!(packed_size, 0); assert_eq!(unpacked_size, 0); - // Must only have one entity since Moves and Positions have the same keys. - assert_eq!(count_table("entities", &pool).await, 1); - assert_eq!(count_table("event_messages", &pool).await, 1); + assert_eq!(count_table("entities", &pool).await, 2); + assert_eq!(count_table("event_messages", &pool).await, 2); let (id, keys): (String, String) = sqlx::query_as( format!( diff --git a/crates/torii/types-test/overlays/dev/records.toml b/crates/torii/types-test/overlays/dev/records.toml deleted file mode 100644 index f7affb04ad..0000000000 --- a/crates/torii/types-test/overlays/dev/records.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "types_test-records" -writes = [ "types_test-Record", "types_test-RecordSibling", "types_test-Subrecord" ] diff --git a/examples/game-lib/armory/manifests/dev/base/abis/dojo-base.json b/examples/game-lib/armory/manifests/dev/base/abis/dojo-base.json deleted file mode 100644 index ee9ceaac66..0000000000 --- a/examples/game-lib/armory/manifests/dev/base/abis/dojo-base.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::components::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::components::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::components::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::base::base::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::components::upgradeable::upgradeable::Event", - "kind": "flat" - } - ] - } -] \ No newline at end of file diff --git a/examples/game-lib/armory/manifests/dev/base/abis/dojo-world.json b/examples/game-lib/armory/manifests/dev/base/abis/dojo-world.json deleted file mode 100644 index 0e5e96210e..0000000000 --- a/examples/game-lib/armory/manifests/dev/base/abis/dojo-world.json +++ /dev/null @@ -1,1105 +0,0 @@ -[ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::IWorld" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "dojo::resource_metadata::ResourceMetadata", - "members": [ - { - "name": "resource_id", - "type": "core::felt252" - }, - { - "name": "metadata_uri", - "type": "core::byte_array::ByteArray" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::IWorld", - "items": [ - { - "type": "function", - "name": "metadata", - "inputs": [ - { - "name": "resource_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::resource_metadata::ResourceMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_metadata", - "inputs": [ - { - "name": "metadata", - "type": "dojo::resource_metadata::ResourceMetadata" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "model", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_namespace", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "deploy_contract", - "inputs": [ - { - "name": "salt", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - }, - { - "name": "init_calldata", - "type": "core::array::Span::" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "uuid", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "emit", - "inputs": [ - { - "name": "keys", - "type": "core::array::Array::" - }, - { - "name": "values", - "type": "core::array::Span::" - } - ], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "function", - "name": "entity", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_entity", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "base", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_owner", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "resource", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_owner", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "resource", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_owner", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "resource", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "is_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "can_write_resource", - "inputs": [ - { - "name": "resource_id", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "can_write_model", - "inputs": [ - { - "name": "model_id", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "can_write_namespace", - "inputs": [ - { - "name": "namespace_id", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableWorld", - "interface_name": "dojo::world::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::IUpgradeableWorld", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableState", - "interface_name": "dojo::interfaces::IUpgradeableState" - }, - { - "type": "struct", - "name": "dojo::interfaces::StorageUpdate", - "members": [ - { - "name": "key", - "type": "core::felt252" - }, - { - "name": "value", - "type": "core::felt252" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::interfaces::ProgramOutput", - "members": [ - { - "name": "prev_state_root", - "type": "core::felt252" - }, - { - "name": "new_state_root", - "type": "core::felt252" - }, - { - "name": "block_number", - "type": "core::felt252" - }, - { - "name": "block_hash", - "type": "core::felt252" - }, - { - "name": "config_hash", - "type": "core::felt252" - }, - { - "name": "world_da_hash", - "type": "core::felt252" - }, - { - "name": "message_to_starknet_segment", - "type": "core::array::Span::" - }, - { - "name": "message_to_appchain_segment", - "type": "core::array::Span::" - } - ] - }, - { - "type": "interface", - "name": "dojo::interfaces::IUpgradeableState", - "items": [ - { - "type": "function", - "name": "upgrade_state", - "inputs": [ - { - "name": "new_state", - "type": "core::array::Span::" - }, - { - "name": "program_output", - "type": "dojo::interfaces::ProgramOutput" - }, - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "ConfigImpl", - "interface_name": "dojo::config::interface::IConfig" - }, - { - "type": "interface", - "name": "dojo::config::interface::IConfig", - "items": [ - { - "type": "function", - "name": "set_differ_program_hash", - "inputs": [ - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "set_merger_program_hash", - "inputs": [ - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_differ_program_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_merger_program_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_facts_registry", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_facts_registry", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [ - { - "name": "contract_base", - "type": "core::starknet::class_hash::ClassHash" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::WorldSpawned", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "creator", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::ContractDeployed", - "kind": "struct", - "members": [ - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::ContractUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::WorldUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::MetadataUpdate", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "uri", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::NamespaceRegistered", - "kind": "struct", - "members": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::ModelRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "prev_class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "prev_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::StoreSetRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::StoreDelRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::OwnerUpdated", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::DifferProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::MergerProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::FactsRegistryUpdate", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::Event", - "kind": "enum", - "variants": [ - { - "name": "DifferProgramHashUpdate", - "type": "dojo::config::component::Config::DifferProgramHashUpdate", - "kind": "nested" - }, - { - "name": "MergerProgramHashUpdate", - "type": "dojo::config::component::Config::MergerProgramHashUpdate", - "kind": "nested" - }, - { - "name": "FactsRegistryUpdate", - "type": "dojo::config::component::Config::FactsRegistryUpdate", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::StateUpdated", - "kind": "struct", - "members": [ - { - "name": "da_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::Event", - "kind": "enum", - "variants": [ - { - "name": "WorldSpawned", - "type": "dojo::world::world::WorldSpawned", - "kind": "nested" - }, - { - "name": "ContractDeployed", - "type": "dojo::world::world::ContractDeployed", - "kind": "nested" - }, - { - "name": "ContractUpgraded", - "type": "dojo::world::world::ContractUpgraded", - "kind": "nested" - }, - { - "name": "WorldUpgraded", - "type": "dojo::world::world::WorldUpgraded", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world::MetadataUpdate", - "kind": "nested" - }, - { - "name": "NamespaceRegistered", - "type": "dojo::world::world::NamespaceRegistered", - "kind": "nested" - }, - { - "name": "ModelRegistered", - "type": "dojo::world::world::ModelRegistered", - "kind": "nested" - }, - { - "name": "StoreSetRecord", - "type": "dojo::world::world::StoreSetRecord", - "kind": "nested" - }, - { - "name": "StoreDelRecord", - "type": "dojo::world::world::StoreDelRecord", - "kind": "nested" - }, - { - "name": "WriterUpdated", - "type": "dojo::world::world::WriterUpdated", - "kind": "nested" - }, - { - "name": "OwnerUpdated", - "type": "dojo::world::world::OwnerUpdated", - "kind": "nested" - }, - { - "name": "ConfigEvent", - "type": "dojo::config::component::Config::Event", - "kind": "nested" - }, - { - "name": "StateUpdated", - "type": "dojo::world::world::StateUpdated", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/examples/game-lib/armory/manifests/dev/base/abis/models/armory-ModelA-19290fb7.json b/examples/game-lib/armory/manifests/dev/base/abis/models/armory-ModelA-19290fb7.json deleted file mode 100644 index 497f653b51..0000000000 --- a/examples/game-lib/armory/manifests/dev/base/abis/models/armory-ModelA-19290fb7.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::database::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::database::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::database::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "model_aImpl", - "interface_name": "armory::Imodel_a" - }, - { - "type": "struct", - "name": "armory::ModelA", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "data", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "armory::Imodel_a", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "armory::ModelA" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "armory::model_a::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/examples/game-lib/armory/manifests/dev/base/dojo-base.toml b/examples/game-lib/armory/manifests/dev/base/dojo-base.toml deleted file mode 100644 index aa92e94fac..0000000000 --- a/examples/game-lib/armory/manifests/dev/base/dojo-base.toml +++ /dev/null @@ -1,6 +0,0 @@ -kind = "Class" -class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" -original_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" -abi = "manifests/dev/base/abis/dojo-base.json" -tag = "dojo-base" -manifest_name = "dojo-base" diff --git a/examples/game-lib/armory/manifests/dev/base/dojo-world.toml b/examples/game-lib/armory/manifests/dev/base/dojo-world.toml deleted file mode 100644 index 83a7a20228..0000000000 --- a/examples/game-lib/armory/manifests/dev/base/dojo-world.toml +++ /dev/null @@ -1,6 +0,0 @@ -kind = "Class" -class_hash = "0x210dd8e484e5555dc74a4a600b17878fc108911719b04139309acc874160c51" -original_class_hash = "0x210dd8e484e5555dc74a4a600b17878fc108911719b04139309acc874160c51" -abi = "manifests/dev/base/abis/dojo-world.json" -tag = "dojo-world" -manifest_name = "dojo-world" diff --git a/examples/game-lib/armory/manifests/dev/base/models/armory-ModelA-19290fb7.toml b/examples/game-lib/armory/manifests/dev/base/models/armory-ModelA-19290fb7.toml deleted file mode 100644 index d43f6c1286..0000000000 --- a/examples/game-lib/armory/manifests/dev/base/models/armory-ModelA-19290fb7.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0xc9cbc616fe628f80bb6d80181100c50e2053c811bcd1ae148bdaebc472a602" -original_class_hash = "0xc9cbc616fe628f80bb6d80181100c50e2053c811bcd1ae148bdaebc472a602" -abi = "manifests/dev/base/abis/models/armory-ModelA-19290fb7.json" -tag = "armory-ModelA" -manifest_name = "armory-ModelA-19290fb7" - -[[members]] -name = "player" -type = "starknet::ContractAddress" -key = true - -[[members]] -name = "data" -type = "u32" -key = false diff --git a/examples/spawn-and-move/manifest_dev.json b/examples/spawn-and-move/manifest_dev.json index 694207eade..ff8cf18765 100644 --- a/examples/spawn-and-move/manifest_dev.json +++ b/examples/spawn-and-move/manifest_dev.json @@ -1786,8 +1786,13 @@ "systems": [] }, { +<<<<<<< HEAD + "address": "0x200cd8070a7dbe0894c74426d2f4c9d778b13042ce955203cb189d85cfb43d1", + "class_hash": "0x4f290c42a0a2e342bf8da74103a31c6e3f2ebca2c72054da9d6d24754c3cc7e", +======= "address": "0x79e0653fbebdbdb864ca69d1470b263f2efdfce9cf355cfe9c7719627eff792", "class_hash": "0x3356ff99134a997be6f9366c47ad18993aac3e29803819cc80309a57fa23f88", +>>>>>>> dojo/main "abi": [ { "type": "impl", @@ -1991,13 +1996,13 @@ "events": [ { "members": [], - "class_hash": "0x37920709310be24ce9be9993d3f17b632a080eef9d4383b03fe251189696cc2", - "tag": "ContractInitialized" + "class_hash": "0x22c33f3c7e525a21cd3651326f74c61deff6d75e26e06725f53ac2dfd4646fa", + "tag": "Moved" }, { "members": [], - "class_hash": "0x22c33f3c7e525a21cd3651326f74c61deff6d75e26e06725f53ac2dfd4646fa", - "tag": "Moved" + "class_hash": "0x2c78ad5ec05d05be24a1cbace308ad15bff9375b56be8a8fa892ff5fc79eb23", + "tag": "MyInit" } ] } \ No newline at end of file diff --git a/examples/spawn-and-move/manifests/dev/deployment/manifest.json b/examples/spawn-and-move/manifests/dev/deployment/manifest.json deleted file mode 100644 index 58e6346d19..0000000000 --- a/examples/spawn-and-move/manifests/dev/deployment/manifest.json +++ /dev/null @@ -1,6830 +0,0 @@ -{ - "world": { - "kind": "WorldContract", - "class_hash": "0x6f38d5d9507c5d9546290e1a27e309efe5a9af3770b6cc1627db4a1b90a7dce", - "original_class_hash": "0x6f38d5d9507c5d9546290e1a27e309efe5a9af3770b6cc1627db4a1b90a7dce", - "abi": [ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::world_contract::IWorld" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::metadata::ResourceMetadata", - "members": [ - { - "name": "resource_id", - "type": "core::felt252" - }, - { - "name": "metadata_uri", - "type": "core::byte_array::ByteArray" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::model::ModelIndex", - "variants": [ - { - "name": "Keys", - "type": "core::array::Span::" - }, - { - "name": "Id", - "type": "core::felt252" - }, - { - "name": "MemberId", - "type": "(core::felt252, core::felt252)" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "enum", - "name": "dojo::world::world_contract::Resource", - "variants": [ - { - "name": "Model", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Contract", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Namespace", - "type": "()" - }, - { - "name": "World", - "type": "()" - }, - { - "name": "Unregistered", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorld", - "items": [ - { - "type": "function", - "name": "metadata", - "inputs": [ - { - "name": "resource_selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_metadata", - "inputs": [ - { - "name": "metadata", - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_namespace", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "deploy_contract", - "inputs": [ - { - "name": "salt", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "init_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "init_calldata", - "type": "core::array::Span::" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "uuid", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "emit", - "inputs": [ - { - "name": "keys", - "type": "core::array::Array::" - }, - { - "name": "values", - "type": "core::array::Span::" - } - ], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "function", - "name": "entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "base", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "resource", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::world::world_contract::Resource" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "is_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableWorld", - "interface_name": "dojo::world::world_contract::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IUpgradeableWorld", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableState", - "interface_name": "dojo::world::update::IUpgradeableState" - }, - { - "type": "struct", - "name": "dojo::world::update::StorageUpdate", - "members": [ - { - "name": "key", - "type": "core::felt252" - }, - { - "name": "value", - "type": "core::felt252" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::world::update::ProgramOutput", - "members": [ - { - "name": "prev_state_root", - "type": "core::felt252" - }, - { - "name": "new_state_root", - "type": "core::felt252" - }, - { - "name": "block_number", - "type": "core::felt252" - }, - { - "name": "block_hash", - "type": "core::felt252" - }, - { - "name": "config_hash", - "type": "core::felt252" - }, - { - "name": "world_da_hash", - "type": "core::felt252" - }, - { - "name": "message_to_starknet_segment", - "type": "core::array::Span::" - }, - { - "name": "message_to_appchain_segment", - "type": "core::array::Span::" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::update::IUpgradeableState", - "items": [ - { - "type": "function", - "name": "upgrade_state", - "inputs": [ - { - "name": "new_state", - "type": "core::array::Span::" - }, - { - "name": "program_output", - "type": "dojo::world::update::ProgramOutput" - }, - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "ConfigImpl", - "interface_name": "dojo::world::config::IConfig" - }, - { - "type": "interface", - "name": "dojo::world::config::IConfig", - "items": [ - { - "type": "function", - "name": "set_differ_program_hash", - "inputs": [ - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "set_merger_program_hash", - "inputs": [ - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_differ_program_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_merger_program_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_facts_registry", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_facts_registry", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [ - { - "name": "contract_base", - "type": "core::starknet::class_hash::ClassHash" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldSpawned", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "creator", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ContractDeployed", - "kind": "struct", - "members": [ - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ContractUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ContractInitialized", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "init_calldata", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "uri", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::NamespaceRegistered", - "kind": "struct", - "members": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "prev_class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "prev_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "member_selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::DifferProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::Event", - "kind": "enum", - "variants": [ - { - "name": "DifferProgramHashUpdate", - "type": "dojo::world::config::Config::DifferProgramHashUpdate", - "kind": "nested" - }, - { - "name": "MergerProgramHashUpdate", - "type": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "nested" - }, - { - "name": "FactsRegistryUpdate", - "type": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StateUpdated", - "kind": "struct", - "members": [ - { - "name": "da_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::Event", - "kind": "enum", - "variants": [ - { - "name": "WorldSpawned", - "type": "dojo::world::world_contract::world::WorldSpawned", - "kind": "nested" - }, - { - "name": "ContractDeployed", - "type": "dojo::world::world_contract::world::ContractDeployed", - "kind": "nested" - }, - { - "name": "ContractUpgraded", - "type": "dojo::world::world_contract::world::ContractUpgraded", - "kind": "nested" - }, - { - "name": "ContractInitialized", - "type": "dojo::world::world_contract::world::ContractInitialized", - "kind": "nested" - }, - { - "name": "WorldUpgraded", - "type": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "nested" - }, - { - "name": "NamespaceRegistered", - "type": "dojo::world::world_contract::world::NamespaceRegistered", - "kind": "nested" - }, - { - "name": "ModelRegistered", - "type": "dojo::world::world_contract::world::ModelRegistered", - "kind": "nested" - }, - { - "name": "ModelUpgraded", - "type": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "nested" - }, - { - "name": "StoreSetRecord", - "type": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateRecord", - "type": "dojo::world::world_contract::world::StoreUpdateRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateMember", - "type": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "nested" - }, - { - "name": "StoreDelRecord", - "type": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "nested" - }, - { - "name": "WriterUpdated", - "type": "dojo::world::world_contract::world::WriterUpdated", - "kind": "nested" - }, - { - "name": "OwnerUpdated", - "type": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "nested" - }, - { - "name": "ConfigEvent", - "type": "dojo::world::config::Config::Event", - "kind": "nested" - }, - { - "name": "StateUpdated", - "type": "dojo::world::world_contract::world::StateUpdated", - "kind": "nested" - } - ] - } - ], - "address": "0x46c1fd10836a8426197bf412fc5f26ea10f11a8d5c61474407f03f82c096593", - "transaction_hash": "0x260b430cd6b661142ae2e60699a3abb0bf4b2e10c36ab723d96f619a99859f7", - "block_number": 3, - "seed": "dojo_examples", - "metadata": { - "profile_name": "dev", - "rpc_url": "http://localhost:5050/" - }, - "manifest_name": "dojo-world" - }, - "base": { - "kind": "Class", - "class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "original_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": "manifests/dev/deployment/abis/dojo-base.json", - "tag": "dojo-base", - "manifest_name": "dojo-base" - }, - "contracts": [ - { - "kind": "DojoContract", - "address": "0x7fed9d6acaa45011152ea992784d41df3ae74eedbc199feb91b3fcbdb78abad", - "class_hash": "0x2aaecb3ded9ebb721f13780007e9704cba0d96b48195f357a35f4969d1b1941", - "original_class_hash": "0x2aaecb3ded9ebb721f13780007e9704cba0d96b48195f357a35f4969d1b1941", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::contract::IContract" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "ActionsImpl", - "interface_name": "dojo_examples::actions::IActions" - }, - { - "type": "enum", - "name": "dojo_examples::models::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, - { - "name": "Up", - "type": "()" - }, - { - "name": "Down", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::Vec2", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::Position", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "vec", - "type": "dojo_examples::models::Vec2" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::PlayerItem", - "members": [ - { - "name": "item_id", - "type": "core::integer::u32" - }, - { - "name": "quantity", - "type": "core::integer::u32" - }, - { - "name": "score", - "type": "core::integer::i32" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::actions::IActions", - "items": [ - { - "type": "function", - "name": "spawn", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "move", - "inputs": [ - { - "name": "direction", - "type": "dojo_examples::models::Direction" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "set_player_config", - "inputs": [ - { - "name": "name", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_player_position", - "inputs": [], - "outputs": [ - { - "type": "dojo_examples::models::Position" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "update_player_name", - "inputs": [ - { - "name": "name", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "update_player_items", - "inputs": [ - { - "name": "items", - "type": "core::array::Array::" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "reset_player_config", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "set_player_server_profile", - "inputs": [ - { - "name": "server_id", - "type": "core::integer::u32" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "set_models", - "inputs": [ - { - "name": "seed", - "type": "core::felt252" - }, - { - "name": "n_models", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "enter_dungeon", - "inputs": [ - { - "name": "dungeon_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "dojo_examples::actions::actions::IDojoInit" - }, - { - "type": "interface", - "name": "dojo_examples::actions::actions::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::actions::actions::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [ - "ns:dojo_examples" - ], - "init_calldata": [], - "tag": "dojo_examples-actions", - "systems": [ - "set_models", - "spawn", - "move", - "set_player_config", - "reset_player_config", - "set_player_server_profile", - "enter_dungeon", - "update_player_name", - "update_player_items" - ], - "manifest_name": "dojo_examples-actions-40b6994c" - }, - { - "kind": "DojoContract", - "address": "0x47dcd4e30618d32fd27951e977df1d819d6edff2506e52c653f658134062036", - "class_hash": "0x117e4d75bef86d66e413d13f30904d2c93798f513ffa0bf83b4fac3fdfc4a62", - "original_class_hash": "0x117e4d75bef86d66e413d13f30904d2c93798f513ffa0bf83b4fac3fdfc4a62", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::contract::IContract" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "IDungeonImpl", - "interface_name": "dojo_examples::dungeon::IDungeon" - }, - { - "type": "interface", - "name": "dojo_examples::dungeon::IDungeon", - "items": [ - { - "type": "function", - "name": "enter", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "dojo_examples::dungeon::dungeon::IDojoInit" - }, - { - "type": "interface", - "name": "dojo_examples::dungeon::dungeon::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::dungeon::dungeon::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [], - "init_calldata": [], - "tag": "dojo_examples-dungeon", - "systems": [ - "enter" - ], - "manifest_name": "dojo_examples-dungeon-6620e0e6" - }, - { - "kind": "DojoContract", - "address": "0x71c327d19b2d0c6a0f65cced59f60fe69776af6885e8f42d8f6775af00f5d5b", - "class_hash": "0x3ad65950996d7b0bc6c04a94d401cdb19bda3ab2cffc2098d90e25077dfa11a", - "original_class_hash": "0x3ad65950996d7b0bc6c04a94d401cdb19bda3ab2cffc2098d90e25077dfa11a", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::contract::IContract" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "dojo_examples::mock_token::mock_token::IDojoInit" - }, - { - "type": "interface", - "name": "dojo_examples::mock_token::mock_token::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::mock_token::mock_token::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [ - "ns:dojo_examples" - ], - "init_calldata": [], - "tag": "dojo_examples-mock_token", - "systems": [], - "manifest_name": "dojo_examples-mock_token-31599eb2" - }, - { - "kind": "DojoContract", - "address": "0x6a116545acc77daea729bf5f14a71f634ddddedb7e7e77f280d8d984054edaf", - "class_hash": "0x2331b72955719869459bdacf66061a55975d6c2bc379349b082ee9d9a350a18", - "original_class_hash": "0x2331b72955719869459bdacf66061a55975d6c2bc379349b082ee9d9a350a18", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::contract::IContract" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "dojo_examples::others::others::IDojoInit" - }, - { - "type": "interface", - "name": "dojo_examples::others::others::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [ - { - "name": "actions_address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "actions_class", - "type": "core::starknet::class_hash::ClassHash" - }, - { - "name": "value", - "type": "core::integer::u8" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::others::others::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [], - "init_calldata": [ - "$contract_address:dojo_examples-actions", - "$class_hash:dojo_examples-actions", - "10" - ], - "tag": "dojo_examples-others", - "systems": [], - "manifest_name": "dojo_examples-others-61de2c18" - } - ], - "models": [ - { - "kind": "DojoModel", - "members": [ - { - "name": "contract_address", - "type": "ContractAddress", - "key": true - }, - { - "name": "contract_class", - "type": "ClassHash", - "key": false - }, - { - "name": "value", - "type": "u8", - "key": false - } - ], - "class_hash": "0x720bb4a3a1324dea862ac8b3ac3e30ac55490ce6ec9f7f68341db081b290c08", - "original_class_hash": "0x720bb4a3a1324dea862ac8b3ac3e30ac55490ce6ec9f7f68341db081b290c08", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "contract_initializedImpl", - "interface_name": "dojo_examples::others::others::Icontract_initialized" - }, - { - "type": "struct", - "name": "dojo_examples::others::others::ContractInitialized", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "contract_class", - "type": "core::starknet::class_hash::ClassHash" - }, - { - "name": "value", - "type": "core::integer::u8" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::others::others::Icontract_initialized", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::others::others::ContractInitialized" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::others::others::contract_initialized::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-ContractInitialized", - "qualified_path": "dojo_examples::others::others::contract_initialized", - "manifest_name": "dojo_examples-ContractInitialized-376b7bd6" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "identity", - "type": "ContractAddress", - "key": true - }, - { - "name": "channel", - "type": "felt252", - "key": true - }, - { - "name": "message", - "type": "ByteArray", - "key": false - }, - { - "name": "salt", - "type": "felt252", - "key": true - } - ], - "class_hash": "0x3ca17c0ebb595e1d1cc01813923864316a49b91f4a725ef1371329abbc1947b", - "original_class_hash": "0x3ca17c0ebb595e1d1cc01813923864316a49b91f4a725ef1371329abbc1947b", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "messageImpl", - "interface_name": "dojo_examples::models::Imessage" - }, - { - "type": "struct", - "name": "dojo_examples::models::Message", - "members": [ - { - "name": "identity", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "channel", - "type": "core::felt252" - }, - { - "name": "message", - "type": "core::byte_array::ByteArray" - }, - { - "name": "salt", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::models::Imessage", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::models::Message" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::models::message::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-Message", - "qualified_path": "dojo_examples::models::message", - "manifest_name": "dojo_examples-Message-1bb1d226" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "account", - "type": "ContractAddress", - "key": true - }, - { - "name": "amount", - "type": "u128", - "key": false - } - ], - "class_hash": "0x244a875f2049e4ca875b631270f1203a5be374fc040a8c4bd40405eeeea07bd", - "original_class_hash": "0x244a875f2049e4ca875b631270f1203a5be374fc040a8c4bd40405eeeea07bd", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "mock_tokenImpl", - "interface_name": "dojo_examples::models::Imock_token" - }, - { - "type": "struct", - "name": "dojo_examples::models::MockToken", - "members": [ - { - "name": "account", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "amount", - "type": "core::integer::u128" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::models::Imock_token", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::models::MockToken" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::models::mock_token::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-MockToken", - "qualified_path": "dojo_examples::models::mock_token", - "manifest_name": "dojo_examples-MockToken-38903c7c" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "direction", - "type": "Direction", - "key": false - } - ], - "class_hash": "0x71f21bb9f7454ede4f4fe1482012218ef57448ca9687018dab409c4ddb790a2", - "original_class_hash": "0x71f21bb9f7454ede4f4fe1482012218ef57448ca9687018dab409c4ddb790a2", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "movedImpl", - "interface_name": "dojo_examples::actions::actions::Imoved" - }, - { - "type": "enum", - "name": "dojo_examples::models::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, - { - "name": "Up", - "type": "()" - }, - { - "name": "Down", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::actions::actions::Moved", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "direction", - "type": "dojo_examples::models::Direction" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::actions::actions::Imoved", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::actions::actions::Moved" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::actions::actions::moved::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-Moved", - "qualified_path": "dojo_examples::actions::actions::moved", - "manifest_name": "dojo_examples-Moved-318ae40d" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "remaining", - "type": "u8", - "key": false - }, - { - "name": "last_direction", - "type": "Direction", - "key": false - } - ], - "class_hash": "0x4dd1c573b5cdc56561be8b28a4840048a3a008d1a4a6eed397ec4135effaf44", - "original_class_hash": "0x4dd1c573b5cdc56561be8b28a4840048a3a008d1a4a6eed397ec4135effaf44", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "movesImpl", - "interface_name": "dojo_examples::models::Imoves" - }, - { - "type": "enum", - "name": "dojo_examples::models::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, - { - "name": "Up", - "type": "()" - }, - { - "name": "Down", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::Moves", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "remaining", - "type": "core::integer::u8" - }, - { - "name": "last_direction", - "type": "dojo_examples::models::Direction" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::models::Imoves", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::models::Moves" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::models::moves::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-Moves", - "qualified_path": "dojo_examples::models::moves", - "manifest_name": "dojo_examples-Moves-2e2accba" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "name", - "type": "ByteArray", - "key": false - }, - { - "name": "items", - "type": "Array", - "key": false - }, - { - "name": "favorite_item", - "type": "Option", - "key": false - } - ], - "class_hash": "0x515f106010313c2fcd87719836e75873aa75a711a4bdcd2ea0b6e38854deebf", - "original_class_hash": "0x515f106010313c2fcd87719836e75873aa75a711a4bdcd2ea0b6e38854deebf", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "player_configImpl", - "interface_name": "dojo_examples::models::Iplayer_config" - }, - { - "type": "struct", - "name": "dojo_examples::models::PlayerItem", - "members": [ - { - "name": "item_id", - "type": "core::integer::u32" - }, - { - "name": "quantity", - "type": "core::integer::u32" - }, - { - "name": "score", - "type": "core::integer::i32" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::PlayerConfig", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray" - }, - { - "name": "items", - "type": "core::array::Array::" - }, - { - "name": "favorite_item", - "type": "core::option::Option::" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::models::Iplayer_config", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::models::PlayerConfig" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::models::player_config::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-PlayerConfig", - "qualified_path": "dojo_examples::models::player_config", - "manifest_name": "dojo_examples-PlayerConfig-3adad785" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "vec", - "type": "Vec2", - "key": false - } - ], - "class_hash": "0x5af60d63e6a1d25fc117fde1fa7e1d628adc46a52c3d007541ed6dd369e8ea", - "original_class_hash": "0x5af60d63e6a1d25fc117fde1fa7e1d628adc46a52c3d007541ed6dd369e8ea", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "positionImpl", - "interface_name": "dojo_examples::models::Iposition" - }, - { - "type": "struct", - "name": "dojo_examples::models::Vec2", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::Position", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "vec", - "type": "dojo_examples::models::Vec2" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::models::Iposition", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::models::Position" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::models::position::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-Position", - "qualified_path": "dojo_examples::models::position", - "manifest_name": "dojo_examples-Position-1e145e26" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "server_id", - "type": "u32", - "key": true - }, - { - "name": "name", - "type": "ByteArray", - "key": false - } - ], - "class_hash": "0x2fa72f20995710bef20ac3c36e2f43ec210517a787927ea3407e2b29c21bb0b", - "original_class_hash": "0x2fa72f20995710bef20ac3c36e2f43ec210517a787927ea3407e2b29c21bb0b", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "server_profileImpl", - "interface_name": "dojo_examples::models::Iserver_profile" - }, - { - "type": "struct", - "name": "dojo_examples::models::ServerProfile", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "server_id", - "type": "core::integer::u32" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray" - } - ] - }, - { - "type": "interface", - "name": "dojo_examples::models::Iserver_profile", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_examples::models::ServerProfile" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_examples::models::server_profile::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples-ServerProfile", - "qualified_path": "dojo_examples::models::server_profile", - "manifest_name": "dojo_examples-ServerProfile-4caad1e6" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "id", - "type": "u32", - "key": true - }, - { - "name": "health", - "type": "u32", - "key": false - }, - { - "name": "armor", - "type": "u32", - "key": false - }, - { - "name": "attack", - "type": "u32", - "key": false - } - ], - "class_hash": "0x4f3cbb247febb63bf5ab34d87504fd85e7a3b4ab6ff16fa2bf23597bf3309c7", - "original_class_hash": "0x4f3cbb247febb63bf5ab34d87504fd85e7a3b4ab6ff16fa2bf23597bf3309c7", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "river_skaleImpl", - "interface_name": "bestiary::Iriver_skale" - }, - { - "type": "struct", - "name": "bestiary::RiverSkale", - "members": [ - { - "name": "id", - "type": "core::integer::u32" - }, - { - "name": "health", - "type": "core::integer::u32" - }, - { - "name": "armor", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bestiary::Iriver_skale", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bestiary::RiverSkale" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bestiary::river_skale::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples_foes-RiverSkale", - "qualified_path": "bestiary::river_skale", - "manifest_name": "dojo_examples_foes-RiverSkale-39535c12" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "id", - "type": "u32", - "key": true - }, - { - "name": "atk_speek", - "type": "u32", - "key": false - }, - { - "name": "range", - "type": "u32", - "key": false - } - ], - "class_hash": "0x783cecd986c0f03f8ac70318f67d57ea8072db7d4d135d54585f4de33c879ad", - "original_class_hash": "0x783cecd986c0f03f8ac70318f67d57ea8072db7d4d135d54585f4de33c879ad", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::model::IModel" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::layout::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "flatbowImpl", - "interface_name": "armory::Iflatbow" - }, - { - "type": "struct", - "name": "armory::Flatbow", - "members": [ - { - "name": "id", - "type": "core::integer::u32" - }, - { - "name": "atk_speek", - "type": "core::integer::u32" - }, - { - "name": "range", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "armory::Iflatbow", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "armory::Flatbow" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "armory::flatbow::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "dojo_examples_weapons-Flatbow", - "qualified_path": "armory::flatbow", - "manifest_name": "dojo_examples_weapons-Flatbow-22f5bd16" - } - ] -} \ No newline at end of file diff --git a/examples/spawn-and-move/manifests/dev/deployment/manifest.toml b/examples/spawn-and-move/manifests/dev/deployment/manifest.toml deleted file mode 100644 index bafe2c4a2a..0000000000 --- a/examples/spawn-and-move/manifests/dev/deployment/manifest.toml +++ /dev/null @@ -1,332 +0,0 @@ -[world] -kind = "WorldContract" -class_hash = "0x6f38d5d9507c5d9546290e1a27e309efe5a9af3770b6cc1627db4a1b90a7dce" -original_class_hash = "0x6f38d5d9507c5d9546290e1a27e309efe5a9af3770b6cc1627db4a1b90a7dce" -abi = "manifests/dev/deployment/abis/dojo-world.json" -address = "0x46c1fd10836a8426197bf412fc5f26ea10f11a8d5c61474407f03f82c096593" -transaction_hash = "0x260b430cd6b661142ae2e60699a3abb0bf4b2e10c36ab723d96f619a99859f7" -block_number = 3 -seed = "dojo_examples" -manifest_name = "dojo-world" - -[world.metadata] -profile_name = "dev" -rpc_url = "http://localhost:5050/" - -[base] -kind = "Class" -class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -original_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/dojo-base.json" -tag = "dojo-base" -manifest_name = "dojo-base" - -[[contracts]] -kind = "DojoContract" -address = "0x7fed9d6acaa45011152ea992784d41df3ae74eedbc199feb91b3fcbdb78abad" -class_hash = "0x2aaecb3ded9ebb721f13780007e9704cba0d96b48195f357a35f4969d1b1941" -original_class_hash = "0x2aaecb3ded9ebb721f13780007e9704cba0d96b48195f357a35f4969d1b1941" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/dojo_examples-actions-40b6994c.json" -reads = [] -writes = ["ns:dojo_examples"] -init_calldata = [] -tag = "dojo_examples-actions" -systems = [ - "set_models", - "spawn", - "move", - "set_player_config", - "reset_player_config", - "set_player_server_profile", - "enter_dungeon", - "update_player_name", - "update_player_items", -] -manifest_name = "dojo_examples-actions-40b6994c" - -[[contracts]] -kind = "DojoContract" -address = "0x47dcd4e30618d32fd27951e977df1d819d6edff2506e52c653f658134062036" -class_hash = "0x117e4d75bef86d66e413d13f30904d2c93798f513ffa0bf83b4fac3fdfc4a62" -original_class_hash = "0x117e4d75bef86d66e413d13f30904d2c93798f513ffa0bf83b4fac3fdfc4a62" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/dojo_examples-dungeon-6620e0e6.json" -reads = [] -writes = [] -init_calldata = [] -tag = "dojo_examples-dungeon" -systems = ["enter"] -manifest_name = "dojo_examples-dungeon-6620e0e6" - -[[contracts]] -kind = "DojoContract" -address = "0x71c327d19b2d0c6a0f65cced59f60fe69776af6885e8f42d8f6775af00f5d5b" -class_hash = "0x3ad65950996d7b0bc6c04a94d401cdb19bda3ab2cffc2098d90e25077dfa11a" -original_class_hash = "0x3ad65950996d7b0bc6c04a94d401cdb19bda3ab2cffc2098d90e25077dfa11a" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/dojo_examples-mock_token-31599eb2.json" -reads = [] -writes = ["ns:dojo_examples"] -init_calldata = [] -tag = "dojo_examples-mock_token" -systems = [] -manifest_name = "dojo_examples-mock_token-31599eb2" - -[[contracts]] -kind = "DojoContract" -address = "0x6a116545acc77daea729bf5f14a71f634ddddedb7e7e77f280d8d984054edaf" -class_hash = "0x2331b72955719869459bdacf66061a55975d6c2bc379349b082ee9d9a350a18" -original_class_hash = "0x2331b72955719869459bdacf66061a55975d6c2bc379349b082ee9d9a350a18" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/dojo_examples-others-61de2c18.json" -reads = [] -writes = [] -init_calldata = [ - "$contract_address:dojo_examples-actions", - "$class_hash:dojo_examples-actions", - "10", -] -tag = "dojo_examples-others" -systems = [] -manifest_name = "dojo_examples-others-61de2c18" - -[[models]] -kind = "DojoModel" -class_hash = "0x720bb4a3a1324dea862ac8b3ac3e30ac55490ce6ec9f7f68341db081b290c08" -original_class_hash = "0x720bb4a3a1324dea862ac8b3ac3e30ac55490ce6ec9f7f68341db081b290c08" -abi = "manifests/dev/deployment/abis/models/dojo_examples-ContractInitialized-376b7bd6.json" -tag = "dojo_examples-ContractInitialized" -qualified_path = "dojo_examples::others::others::contract_initialized" -manifest_name = "dojo_examples-ContractInitialized-376b7bd6" - -[[models.members]] -name = "contract_address" -type = "ContractAddress" -key = true - -[[models.members]] -name = "contract_class" -type = "ClassHash" -key = false - -[[models.members]] -name = "value" -type = "u8" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x3ca17c0ebb595e1d1cc01813923864316a49b91f4a725ef1371329abbc1947b" -original_class_hash = "0x3ca17c0ebb595e1d1cc01813923864316a49b91f4a725ef1371329abbc1947b" -abi = "manifests/dev/deployment/abis/models/dojo_examples-Message-1bb1d226.json" -tag = "dojo_examples-Message" -qualified_path = "dojo_examples::models::message" -manifest_name = "dojo_examples-Message-1bb1d226" - -[[models.members]] -name = "identity" -type = "ContractAddress" -key = true - -[[models.members]] -name = "channel" -type = "felt252" -key = true - -[[models.members]] -name = "message" -type = "ByteArray" -key = false - -[[models.members]] -name = "salt" -type = "felt252" -key = true - -[[models]] -kind = "DojoModel" -class_hash = "0x244a875f2049e4ca875b631270f1203a5be374fc040a8c4bd40405eeeea07bd" -original_class_hash = "0x244a875f2049e4ca875b631270f1203a5be374fc040a8c4bd40405eeeea07bd" -abi = "manifests/dev/deployment/abis/models/dojo_examples-MockToken-38903c7c.json" -tag = "dojo_examples-MockToken" -qualified_path = "dojo_examples::models::mock_token" -manifest_name = "dojo_examples-MockToken-38903c7c" - -[[models.members]] -name = "account" -type = "ContractAddress" -key = true - -[[models.members]] -name = "amount" -type = "u128" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x71f21bb9f7454ede4f4fe1482012218ef57448ca9687018dab409c4ddb790a2" -original_class_hash = "0x71f21bb9f7454ede4f4fe1482012218ef57448ca9687018dab409c4ddb790a2" -abi = "manifests/dev/deployment/abis/models/dojo_examples-Moved-318ae40d.json" -tag = "dojo_examples-Moved" -qualified_path = "dojo_examples::actions::actions::moved" -manifest_name = "dojo_examples-Moved-318ae40d" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "direction" -type = "Direction" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x4dd1c573b5cdc56561be8b28a4840048a3a008d1a4a6eed397ec4135effaf44" -original_class_hash = "0x4dd1c573b5cdc56561be8b28a4840048a3a008d1a4a6eed397ec4135effaf44" -abi = "manifests/dev/deployment/abis/models/dojo_examples-Moves-2e2accba.json" -tag = "dojo_examples-Moves" -qualified_path = "dojo_examples::models::moves" -manifest_name = "dojo_examples-Moves-2e2accba" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "remaining" -type = "u8" -key = false - -[[models.members]] -name = "last_direction" -type = "Direction" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x515f106010313c2fcd87719836e75873aa75a711a4bdcd2ea0b6e38854deebf" -original_class_hash = "0x515f106010313c2fcd87719836e75873aa75a711a4bdcd2ea0b6e38854deebf" -abi = "manifests/dev/deployment/abis/models/dojo_examples-PlayerConfig-3adad785.json" -tag = "dojo_examples-PlayerConfig" -qualified_path = "dojo_examples::models::player_config" -manifest_name = "dojo_examples-PlayerConfig-3adad785" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "name" -type = "ByteArray" -key = false - -[[models.members]] -name = "items" -type = "Array" -key = false - -[[models.members]] -name = "favorite_item" -type = "Option" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x5af60d63e6a1d25fc117fde1fa7e1d628adc46a52c3d007541ed6dd369e8ea" -original_class_hash = "0x5af60d63e6a1d25fc117fde1fa7e1d628adc46a52c3d007541ed6dd369e8ea" -abi = "manifests/dev/deployment/abis/models/dojo_examples-Position-1e145e26.json" -tag = "dojo_examples-Position" -qualified_path = "dojo_examples::models::position" -manifest_name = "dojo_examples-Position-1e145e26" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "vec" -type = "Vec2" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x2fa72f20995710bef20ac3c36e2f43ec210517a787927ea3407e2b29c21bb0b" -original_class_hash = "0x2fa72f20995710bef20ac3c36e2f43ec210517a787927ea3407e2b29c21bb0b" -abi = "manifests/dev/deployment/abis/models/dojo_examples-ServerProfile-4caad1e6.json" -tag = "dojo_examples-ServerProfile" -qualified_path = "dojo_examples::models::server_profile" -manifest_name = "dojo_examples-ServerProfile-4caad1e6" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "server_id" -type = "u32" -key = true - -[[models.members]] -name = "name" -type = "ByteArray" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x4f3cbb247febb63bf5ab34d87504fd85e7a3b4ab6ff16fa2bf23597bf3309c7" -original_class_hash = "0x4f3cbb247febb63bf5ab34d87504fd85e7a3b4ab6ff16fa2bf23597bf3309c7" -abi = "manifests/dev/deployment/abis/models/dojo_examples_foes-RiverSkale-39535c12.json" -tag = "dojo_examples_foes-RiverSkale" -qualified_path = "bestiary::river_skale" -manifest_name = "dojo_examples_foes-RiverSkale-39535c12" - -[[models.members]] -name = "id" -type = "u32" -key = true - -[[models.members]] -name = "health" -type = "u32" -key = false - -[[models.members]] -name = "armor" -type = "u32" -key = false - -[[models.members]] -name = "attack" -type = "u32" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x783cecd986c0f03f8ac70318f67d57ea8072db7d4d135d54585f4de33c879ad" -original_class_hash = "0x783cecd986c0f03f8ac70318f67d57ea8072db7d4d135d54585f4de33c879ad" -abi = "manifests/dev/deployment/abis/models/dojo_examples_weapons-Flatbow-22f5bd16.json" -tag = "dojo_examples_weapons-Flatbow" -qualified_path = "armory::flatbow" -manifest_name = "dojo_examples_weapons-Flatbow-22f5bd16" - -[[models.members]] -name = "id" -type = "u32" -key = true - -[[models.members]] -name = "atk_speek" -type = "u32" -key = false - -[[models.members]] -name = "range" -type = "u32" -key = false diff --git a/examples/spawn-and-move/overlays/dev/actions.toml b/examples/spawn-and-move/overlays/dev/actions.toml deleted file mode 100644 index 950f471147..0000000000 --- a/examples/spawn-and-move/overlays/dev/actions.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "dojo_examples-actions" -writes = [ "ns:dojo_examples" ] diff --git a/examples/spawn-and-move/overlays/dev/mock_token.toml b/examples/spawn-and-move/overlays/dev/mock_token.toml deleted file mode 100644 index 61c3ea999f..0000000000 --- a/examples/spawn-and-move/overlays/dev/mock_token.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "dojo_examples-mock_token" -writes = [ "ns:dojo_examples" ] diff --git a/examples/spawn-and-move/overlays/dev/others.toml b/examples/spawn-and-move/overlays/dev/others.toml deleted file mode 100644 index effbcca1da..0000000000 --- a/examples/spawn-and-move/overlays/dev/others.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "dojo_examples-others" -init_calldata = ["$contract_address:dojo_examples-actions", "$class_hash:dojo_examples-actions", "10"] diff --git a/examples/spawn-and-move/overlays/saya/actions.toml b/examples/spawn-and-move/overlays/saya/actions.toml deleted file mode 100644 index 950f471147..0000000000 --- a/examples/spawn-and-move/overlays/saya/actions.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "dojo_examples-actions" -writes = [ "ns:dojo_examples" ] diff --git a/examples/spawn-and-move/overlays/saya/others.toml b/examples/spawn-and-move/overlays/saya/others.toml deleted file mode 100644 index effbcca1da..0000000000 --- a/examples/spawn-and-move/overlays/saya/others.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "dojo_examples-others" -init_calldata = ["$contract_address:dojo_examples-actions", "$class_hash:dojo_examples-actions", "10"] diff --git a/examples/spawn-and-move/src/others.cairo b/examples/spawn-and-move/src/others.cairo index b864d264cb..abbfa42676 100644 --- a/examples/spawn-and-move/src/others.cairo +++ b/examples/spawn-and-move/src/others.cairo @@ -5,7 +5,7 @@ pub mod others { #[derive(Copy, Drop, Serde)] #[dojo::event] - struct ContractInitialized { + struct MyInit { #[key] caller: ContractAddress, value: u8, @@ -14,6 +14,6 @@ pub mod others { fn dojo_init(self: @ContractState, value: u8) { let mut world = self.world(@"ns"); - world.emit_event(@ContractInitialized { caller: get_caller_address(), value }); + world.emit_event(@MyInit { caller: get_caller_address(), value }); } } diff --git a/scripts/rebuild_test_artifacts.sh b/scripts/rebuild_test_artifacts.sh index 4035437344..ccfa7b5e82 100755 --- a/scripts/rebuild_test_artifacts.sh +++ b/scripts/rebuild_test_artifacts.sh @@ -36,7 +36,7 @@ cargo +nightly-2024-08-28 fmt --all -- "$@" ./target/release/sozo build --manifest-path crates/torii/types-test/Scarb.toml # Generates the database for testing by migrating the spawn and move example. -cargo generate-test-db +KATANA_RUNNER_BIN=./target/release/katana cargo generate-test-db # Ensure the user has locally the db dir in /tmp. rm -rf /tmp/spawn-and-move-db rm -rf /tmp/types-test-db diff --git a/spawn-and-move-db.tar.gz b/spawn-and-move-db.tar.gz index 98c19ca607..7d0a793ad4 100644 Binary files a/spawn-and-move-db.tar.gz and b/spawn-and-move-db.tar.gz differ diff --git a/types-test-db.tar.gz b/types-test-db.tar.gz index 42913291c4..f6abaaa511 100644 Binary files a/types-test-db.tar.gz and b/types-test-db.tar.gz differ diff --git a/xtask/generate-test-db/src/main.rs b/xtask/generate-test-db/src/main.rs index fb0ea61bc9..9a6783eb4b 100644 --- a/xtask/generate-test-db/src/main.rs +++ b/xtask/generate-test-db/src/main.rs @@ -56,7 +56,7 @@ async fn migrate_spawn_and_move(db_path: &Path) -> Result { profile_config, runner.url().to_string(), ) - .migrate(&mut MigrationUi::new("").with_silent()) + .migrate(&mut MigrationUi::new(None).with_silent()) .await?; Ok(result.manifest) @@ -103,7 +103,7 @@ async fn migrate_types_test(db_path: &Path) -> Result { profile_config, runner.url().to_string(), ) - .migrate(&mut MigrationUi::new("").with_silent()) + .migrate(&mut MigrationUi::new(None).with_silent()) .await?; Ok(result.manifest)