Skip to content

Commit 092930e

Browse files
committed
fmt
1 parent 9910481 commit 092930e

File tree

6 files changed

+13
-16
lines changed

6 files changed

+13
-16
lines changed

contracts/src/apps/paint/app.cairo

+4-5
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ pub mod paint_actions {
328328

329329
// Update color of the pixel
330330
// TODO check results?
331-
let _result = core_actions
331+
let _result = core_actions
332332
.update_pixel(
333333
player,
334334
system,
@@ -340,13 +340,12 @@ pub mod paint_actions {
340340
text: Option::None,
341341
app: Option::Some(system),
342342
owner: Option::Some(player),
343-
action: Option::None
343+
action: Option::None,
344344
},
345345
Option::None,
346346
false,
347-
).unwrap();
348-
349-
347+
)
348+
.unwrap();
350349

351350
let FADE_SECONDS = 0;
352351

contracts/src/core/actions.cairo

-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ pub mod actions {
211211
super::queue::process_queue(
212212
ref world, id, timestamp, called_system, selector, calldata,
213213
);
214-
215214
}
216215

217216

contracts/src/core/actions/pixel.cairo

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn update_pixel(
107107
}
108108
// Store the Pixel
109109
world.write_model(@pixel);
110-
110+
111111
// Call on_post_update if the pixel has an app
112112
if pixel.app != contract_address_const::<0>() {
113113
let mut caller_app: App = world.read_model(for_system);

contracts/src/core/actions/queue.cairo

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use core::poseidon::poseidon_hash_span;
22
use dojo::model::{ModelStorage};
33
use dojo::world::storage::WorldStorage;
4-
use pixelaw::core::events::{ QueueScheduled};
4+
use pixelaw::core::events::{QueueScheduled};
55
use pixelaw::core::models::area::{BoundsTraitImpl, RTreeNodePackableImpl, RTreeTraitImpl};
66
use pixelaw::core::models::queue::{QueueItem};
77
use starknet::{ContractAddress, syscalls::{call_contract_syscall}};
@@ -21,7 +21,7 @@ pub fn schedule_queue(
2121
.span(),
2222
);
2323

24-
let queueItem = QueueItem {id, valid: true};
24+
let queueItem = QueueItem { id, valid: true };
2525
world.write_model(@queueItem);
2626

2727
// Emit the event, so an external scheduler can pick it up
@@ -36,7 +36,7 @@ pub fn process_queue(
3636
called_system: ContractAddress,
3737
selector: felt252,
3838
calldata: Span<felt252>,
39-
) {
39+
) {
4040
// A quick check on the timestamp so we know it's not too early for this one
4141
assert!(timestamp <= starknet::get_block_timestamp(), "timestamp still in the future");
4242

@@ -46,7 +46,6 @@ pub fn process_queue(
4646
.span(),
4747
);
4848

49-
5049
// Only valid when the queue item was found by the hash
5150
assert!(calculated_id == id, "Invalid Id");
5251

@@ -58,6 +57,4 @@ pub fn process_queue(
5857
let queueItem: QueueItem = world.read_model(id);
5958

6059
world.erase_model(@queueItem);
61-
62-
6360
}

contracts/src/core/utils.cairo

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ use pixelaw::core::models::{
66
pixel::{Pixel},
77
{area::{BoundsTraitImpl, ChildrenPackableImpl, RTreeNodePackableImpl, RTreeTraitImpl}},
88
};
9-
use starknet::{ContractAddress, contract_address_const, get_caller_address,get_contract_address, get_tx_info};
9+
use starknet::{
10+
ContractAddress, contract_address_const, get_caller_address, get_contract_address, get_tx_info,
11+
};
1012

1113

1214
pub const POW_2_96: u128 = 0x1000000000000000000000000_u128;
@@ -122,7 +124,7 @@ pub fn get_callers(
122124
let core_address = get_core_actions_address(ref world);
123125
// let caller_contract = get_caller_address();
124126
let caller_contract = get_contract_address();
125-
127+
126128
if let Option::Some(override) = params.player_override {
127129
// TODO this doesnt work when queue
128130
assert(get_caller_address() == core_address, 'only core can override');

contracts/src/tests/test_helpers.cairo

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use pixelaw::{
1616
core::{
1717
actions::{IActionsDispatcher, IActionsDispatcherTrait, actions},
1818
models::{
19-
area::{m_Area, m_RTree}, pixel::{m_Pixel},queue::{m_QueueItem},
19+
area::{m_Area, m_RTree}, pixel::{m_Pixel}, queue::{m_QueueItem},
2020
registry::{m_App, m_AppName, m_CoreActionsAddress},
2121
},
2222
utils::{Position},

0 commit comments

Comments
 (0)