-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: cairo1 array, fix invoke response, hash separate test
- Loading branch information
Showing
8 changed files
with
4,567 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#[contract] | ||
mod HelloStarknet { | ||
struct Storage { | ||
balance: felt252, | ||
} | ||
|
||
// Increases the balance by the given amount. | ||
#[external] | ||
fn increase_balance(amount: felt252) { | ||
balance::write(balance::read() + amount); | ||
} | ||
|
||
// Returns the current balance. | ||
#[view] | ||
fn get_balance() -> felt252 { | ||
balance::read() | ||
} | ||
} |
Oops, something went wrong.