Skip to content

Commit

Permalink
export view
Browse files Browse the repository at this point in the history
  • Loading branch information
zamrokk committed Sep 29, 2023
1 parent 0058acf commit 741475d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ Declare the view at the end of the file. Do not forget the annotation `@view` !

```ligolang
@view
const feedback = (_: unit, store: storage): string => { return store.feedback };
export const feedback = (_: unit, store: storage): string => { return store.feedback };
```

Compile the contract
Expand Down
4 changes: 3 additions & 1 deletion solution/contracts/pokeGame.jsligo
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ const pokeAndGetFeedback = (oracleAddress: address, store: storage): return_ =>
};

@view
const feedback = (_: unit, store: storage): string => { return store.feedback };
export const feedback = (_: unit, store: storage): string => {
return store.feedback
};

0 comments on commit 741475d

Please sign in to comment.