Skip to content

Commit

Permalink
scarb fmt'd contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
DelevoXDG committed Sep 27, 2023
1 parent 1aaee6c commit 9d23964
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Tests/StarknetTests/Resources/Contracts/src/balance.cairo
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#[starknet::interface] trait IBalance<T> {
#[starknet::interface]
trait IBalance<T> {
// Returns the current balance.
fn get_balance(self: @T) -> u128;
// Increases the balance by the given amount.
fn increase_balance(ref self: T, a: u128);
}

#[starknet::contract] mod Balance {
#[starknet::contract]
mod Balance {
use traits::Into;

#[storage]
struct Storage {
value: u128,
value: u128,
}

#[constructor]
Expand Down
10 changes: 6 additions & 4 deletions Tests/StarknetTests/Resources/Contracts/src/events.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ use starknet::class_hash::Felt252TryIntoClassHash;
use array::ArrayTrait;
use array::SpanTrait;

#[starknet::interface] trait IContractWithEvent<T> {
#[starknet::interface]
trait IContractWithEvent<T> {
fn emit_event(ref self: T, incremental: bool);
}

#[starknet::contract] mod Events {
#[starknet::contract]
mod Events {
use traits::Into;
use starknet::info::get_contract_address;
#[storage]
struct Storage {
value: u128,
value: u128,
}

#[derive(Copy, Drop, PartialEq, starknet::Event)]
struct IncrementalEvent {
value: u128,
value: u128,
}

#[derive(Copy, Drop, PartialEq, starknet::Event)]
Expand Down

0 comments on commit 9d23964

Please sign in to comment.