Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
posaune0423 committed Sep 16, 2024
1 parent 188eba4 commit 8289857
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,13 @@ scarb run init_auth
# Start Torii
torii --world 0x263ae44e5414519a5c5a135cccaf3d9d7ee196d37e8de47a178da91f3de9b34 --allowed-origins "*"
```

### How to deploy

you can deploy your app to the our katana testnet by running the following commands:

```bash
# Deploy the pixelaw app
sozo build -P release
sozo migrate apply -P release
```
4 changes: 3 additions & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.11" }

[[target.dojo]]
build-external-contracts = [
"pixelaw::apps::snake::app::snake",
"pixelaw::apps::snake::app::snake_segment",
"pixelaw::core::models::pixel::pixel",
"pixelaw::core::models::pixel::Pixel",
"pixelaw::core::models::pixel::PixelUpdate",
Expand All @@ -38,4 +40,4 @@ sort-module-level-items = true


[scripts]
init_auth = "./scripts/init_auth.sh"
init_auth = "./scripts/init_auth.sh"
1 change: 0 additions & 1 deletion dojo_release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ mappings = {}
rpc_url = "https://api.cartridge.gg/x/pixelaw-dev/katana/"
account_address = "0x5233cfca86bfa18af0bdef2fd09ac4c1d7c8da71303eb7fc9997fc6d0914d0d"
private_key = "0xf0e37335d0c020789dd02c0460d99637ac23bd2df3d1d25002fd15621542d"
world_address = "0x99b8dbc71926673405f5dfff9e4900ee4d9249798cc5e7ac6f3c3a07907399"
12 changes: 5 additions & 7 deletions src/tests.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#[cfg(test)]
mod tests {
use debug::PrintTrait;

use dojo::utils::test::{spawn_test_world};

use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait};
Expand All @@ -22,7 +21,6 @@ mod tests {

// Helper function: deploys world and actions
fn deploy_world() -> (IWorldDispatcher, IActionsDispatcher, IMyAppActionsDispatcher) {
// Deploy World and models
let mut models = array![
pixel::TEST_CLASS_HASH,
app::TEST_CLASS_HASH,
Expand All @@ -43,11 +41,11 @@ mod tests {
let myapp_actions = IMyAppActionsDispatcher { contract_address: myapp_actions_address };

// Setup dojo auth
world.grant_writer('Pixel', core_actions_address);
world.grant_writer('App', core_actions_address);
world.grant_writer('AppName', core_actions_address);
world.grant_writer('CoreActionsAddress', core_actions_address);
world.grant_writer('Permissions', core_actions_address);
world.grant_writer(selector_from_tag!("pixelaw-Pixel"), core_actions_address);
world.grant_writer(selector_from_tag!("pixelaw-App"), core_actions_address);
world.grant_writer(selector_from_tag!("pixelaw-AppName"), core_actions_address);
world.grant_writer(selector_from_tag!("pixelaw-Permissions"), core_actions_address);
world.grant_writer(selector_from_tag!("pixelaw-CoreActionsAddress"), core_actions_address);

// PLEASE ADD YOUR APP PERMISSIONS HERE

Expand Down

0 comments on commit 8289857

Please sign in to comment.