Skip to content

Commit

Permalink
Scarb fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
b-j-roberts committed Mar 21, 2024
1 parent 704c0b9 commit 0d6b5a6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,21 @@ mod ArtPeace {

// TODO
self.color_count.write(12);
//self.color_count.write(colors.len().try_into().unwrap());
//let mut i = 0;
//while i < colors.len() {
// self.colors.write(i, *colors.at(i));
// i += 1;
//}
//self.color_count.write(colors.len().try_into().unwrap());
//let mut i = 0;
//while i < colors.len() {
// self.colors.write(i, *colors.at(i));
// i += 1;
//}
}

#[abi(embed_v0)]
impl ArtPeaceImpl of super::IArtPeace<ContractState> {
fn place_pixel(ref self: ContractState, pos: u128, color: u8) {
assert!(pos < self.total_pixels.read());
assert!(color < self.color_count.read()); // TODO: remove and consider outside range as base color?
assert!(
color < self.color_count.read()
); // TODO: remove and consider outside range as base color?
let now = starknet::get_block_timestamp();
let caller = starknet::get_caller_address();
// TODO: Only if the user has placed a pixel before?
Expand Down

0 comments on commit 0d6b5a6

Please sign in to comment.