Skip to content

Commit

Permalink
fix: sort modules
Browse files Browse the repository at this point in the history
  • Loading branch information
posaune0423 committed Sep 15, 2024
1 parent 5235fb9 commit 9527dc9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
3 changes: 3 additions & 0 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ pixelaw = { path = "/Users/asumayamada/Private/pixelaw/core/contracts" }

[[target.dojo]]
build-external-contracts = []

[tool.fmt]
sort-module-level-items = true
19 changes: 9 additions & 10 deletions src/app.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,21 @@ const APP_MANIFEST: felt252 = 'BASE/manifests/myapp';
/// contracts must be named as such (APP_KEY + underscore + "actions")
#[dojo::contract(namespace: "pixelaw", nomapping: true)]
mod myapp_actions {
use starknet::{
get_tx_info, get_caller_address, get_contract_address, get_execution_info, ContractAddress
};

use super::IMyAppActions;
use pixelaw::core::models::pixel::{Pixel, PixelUpdate};

use pixelaw::core::models::permissions::{Permission};
use debug::PrintTrait;
use pixelaw::core::actions::{
IActionsDispatcher as ICoreActionsDispatcher,
IActionsDispatcherTrait as ICoreActionsDispatcherTrait
};
use super::{APP_KEY, APP_ICON, APP_MANIFEST};

use pixelaw::core::models::permissions::{Permission};
use pixelaw::core::models::pixel::{Pixel, PixelUpdate};
use pixelaw::core::utils::{get_core_actions, Direction, Position, DefaultParameters};
use starknet::{
get_tx_info, get_caller_address, get_contract_address, get_execution_info, ContractAddress
};

use debug::PrintTrait;
use super::IMyAppActions;
use super::{APP_KEY, APP_ICON, APP_MANIFEST};

// impl: implement functions specified in trait
#[abi(embed_v0)]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.cairo
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mod app;
mod tests;
mod tests;
16 changes: 8 additions & 8 deletions src/tests.cairo
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#[cfg(test)]
mod tests {
use starknet::class_hash::Felt252TryIntoClassHash;
use debug::PrintTrait;

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

use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait};
use pixelaw::core::models::registry::{app, app_name, core_actions_address};

use myapp::app::{myapp_actions, IMyAppActionsDispatcher, IMyAppActionsDispatcherTrait};
use pixelaw::core::actions::{actions, IActionsDispatcher, IActionsDispatcherTrait};
use pixelaw::core::models::permissions::{permissions};

use pixelaw::core::models::pixel::{Pixel, PixelUpdate};
use pixelaw::core::models::pixel::{pixel};
use pixelaw::core::models::permissions::{permissions};
use pixelaw::core::models::registry::{app, app_name, core_actions_address};
use pixelaw::core::utils::{
get_core_actions, encode_color, decode_color, Direction, Position, DefaultParameters
};
use pixelaw::core::actions::{actions, IActionsDispatcher, IActionsDispatcherTrait};

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

use myapp::app::{myapp_actions, IMyAppActionsDispatcher, IMyAppActionsDispatcherTrait};
use starknet::class_hash::Felt252TryIntoClassHash;

use zeroable::Zeroable;

Expand Down

0 comments on commit 9527dc9

Please sign in to comment.