Skip to content

Commit

Permalink
writing contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
sasurobert committed Oct 4, 2023
1 parent 815d898 commit c21f6c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/contracts/counter/counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ void init() {
int64storageStore(COUNTER_KEY, COUNTER_KEY_LEN, 1);
}

void upgrade() {
int64storageStore(COUNTER_KEY, COUNTER_KEY_LEN, 1);
}

void increment() {
i64 counter = int64storageLoad(COUNTER_KEY, COUNTER_KEY_LEN);
counter++;
Expand Down
1 change: 1 addition & 0 deletions test/contracts/counter/counter.export
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
init
upgrade
increment
decrement
get

0 comments on commit c21f6c8

Please sign in to comment.