Skip to content

Commit

Permalink
fix: add tests and fix metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Jul 6, 2024
1 parent 6a086a4 commit de5a588
Show file tree
Hide file tree
Showing 34 changed files with 129 additions and 1,291 deletions.
3 changes: 1 addition & 2 deletions bin/sozo/src/commands/auth.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use anyhow::Result;
use clap::{Args, Subcommand};
use dojo_world::manifest::get_default_namespace_from_ws;
use dojo_world::metadata::Environment;
use dojo_world::metadata::{get_default_namespace_from_ws, Environment};
use scarb::core::Config;
use scarb_ui::Ui;
use sozo_ops::auth;
Expand Down
2 changes: 1 addition & 1 deletion bin/sozo/src/commands/call.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use clap::Args;
use dojo_world::contracts::naming::ensure_namespace;
use dojo_world::manifest::get_default_namespace_from_ws;
use dojo_world::metadata::get_default_namespace_from_ws;
use scarb::core::Config;
use starknet::core::types::Felt;
use tracing::trace;
Expand Down
2 changes: 1 addition & 1 deletion bin/sozo/src/commands/execute.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use clap::Args;
use dojo_world::contracts::naming::ensure_namespace;
use dojo_world::manifest::get_default_namespace_from_ws;
use dojo_world::metadata::get_default_namespace_from_ws;
use scarb::core::Config;
use sozo_ops::execute;
use tracing::trace;
Expand Down
2 changes: 1 addition & 1 deletion bin/sozo/src/commands/model.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use clap::{Args, Subcommand};
use dojo_world::contracts::naming::ensure_namespace;
use dojo_world::manifest::get_default_namespace_from_ws;
use dojo_world::metadata::get_default_namespace_from_ws;
use scarb::core::Config;
use sozo_ops::model;
use starknet::core::types::Felt;
Expand Down
3 changes: 1 addition & 2 deletions bin/sozo/tests/register_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ mod utils;
use camino::Utf8PathBuf;
use dojo_test_utils::compiler;
use dojo_test_utils::migration::prepare_migration;
use dojo_world::manifest::get_default_namespace_from_ws;
use dojo_world::metadata::dojo_metadata_from_workspace;
use dojo_world::metadata::{dojo_metadata_from_workspace, get_default_namespace_from_ws};
use dojo_world::migration::TxnConfig;
use katana_runner::KatanaRunner;
use scarb::compiler::Profile;
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo-lang/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ camino.workspace = true
convert_case.workspace = true
directories = "5"
dojo-types = { path = "../dojo-types" }
dojo-world = { path = "../dojo-world", features = [ "manifest" ] }
dojo-world = { path = "../dojo-world", features = [ "manifest", "metadata" ] }
indoc.workspace = true
itertools.workspace = true
lazy_static.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions crates/dojo-lang/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ use camino::Utf8PathBuf;
use convert_case::{Case, Casing};
use dojo_world::contracts::naming;
use dojo_world::manifest::{
get_default_namespace_from_ws, AbiFormat, Class, ComputedValueEntrypoint, DojoContract,
DojoModel, Manifest, ManifestMethods, ABIS_DIR, BASE_CONTRACT_TAG, BASE_DIR,
BASE_QUALIFIED_PATH, CONTRACTS_DIR, MANIFESTS_DIR, MODELS_DIR, WORLD_CONTRACT_TAG,
WORLD_QUALIFIED_PATH,
AbiFormat, Class, ComputedValueEntrypoint, DojoContract, DojoModel, Manifest, ManifestMethods,
ABIS_DIR, BASE_CONTRACT_TAG, BASE_DIR, BASE_QUALIFIED_PATH, CONTRACTS_DIR, MANIFESTS_DIR,
MODELS_DIR, WORLD_CONTRACT_TAG, WORLD_QUALIFIED_PATH,
};
use dojo_world::metadata::get_default_namespace_from_ws;
use itertools::Itertools;
use scarb::compiler::helpers::{build_compiler_config, collect_main_crate_ids};
use scarb::compiler::{CairoCompilationUnit, CompilationUnitAttributes, Compiler};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ build-external-contracts = [ ]
[tool.dojo.world]
description = "Cairo compiler features"
name = "compiler_cairo_features"
seed = "compiler_cairo_features"
namespace = "ccf"

[tool.dojo.env]
rpc_url = "http://localhost:5050/"

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit de5a588

Please sign in to comment.