Skip to content

Commit

Permalink
updated sdk-js
Browse files Browse the repository at this point in the history
  • Loading branch information
gagdiez committed Sep 9, 2022
1 parent b2807de commit 1562760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contract/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { POINT_ONE, PostedMessage } from './model'
class GuestBook {
messages: PostedMessage[] = [];

@call
@call({payableFunction: true})
// Public - Adds a new message.
add_message({ text }: { text: string }) {
// If the user attaches more than 0.01N the message is premium
Expand All @@ -16,7 +16,7 @@ class GuestBook {
this.messages.push(message);
}

@view
@view({})
// Returns an array of messages.
get_messages({ from_index = 0, limit = 10 }: { from_index: number, limit: number }): PostedMessage[] {
return this.messages.slice(from_index, from_index + limit);
Expand Down

0 comments on commit 1562760

Please sign in to comment.