Skip to content

Commit

Permalink
Add dry run for reset entrypoint (#239)
Browse files Browse the repository at this point in the history
* Add dry run for reset entrypoint

* Include storage value and result

* same for jsligo
  • Loading branch information
timothymcmackin authored Jan 3, 2024
1 parent b18eca6 commit f7aa9e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion docs/tutorials/smart-contract/cameligo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Deploy a smart contract with CameLIGO
authors: 'John Joubert, Sasha Aldrick, Claude Barde, Tim McMackin'
last_update:
date: 5 December 2023
date: 3 January 2024
---

This tutorial covers writing and deploying a simple smart contract with the LIGO programming language.
Expand Down Expand Up @@ -205,6 +205,11 @@ Before you can deploy the contract to Tezos, you must compile it to Michelson, t
You can test the decrement and reset functions in the same way.
If you see any errors, make sure that the code of your contract matches the code in the previous section.

1. Test the `Reset` entrypoint in the same way, but pass `unit` as the input parameter and any integer in the storage field.
The `Reset` entrypoint takes no parameters, but technically it accepts the value `unit`, which means no parameter.

The Result field shows the response `(LIST_EMPTY(), 0)`, which means that the storage value is now 0.

1. On the left side of the page, under **Actions**, click **Compile**, and in the Compile window, click **Compile** again.

If the compilation succeeds, the IDE prints the compiled code to the terminal and saves it to the file `build/contracts/Contract.tz`.
Expand Down
7 changes: 6 additions & 1 deletion docs/tutorials/smart-contract/jsligo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Deploy a smart contract with jsLIGO
authors: 'John Joubert, Sasha Aldrick, Claude Barde, Tim McMackin'
last_update:
date: 5 December 2023
date: 3 January 2024
---

This tutorial covers writing and deploying a simple smart contract with the LIGO programming language.
Expand Down Expand Up @@ -220,6 +220,11 @@ Before you can deploy the contract to Tezos, you must compile it to Michelson, t
You can test the decrement and reset functions in the same way.
If you see any errors, make sure that the code of your contract matches the code in the previous section.

1. Test the `Reset` entrypoint in the same way, but pass `unit` as the input parameter and any integer in the storage field.
The `Reset` entrypoint takes no parameters, but technically it accepts the value `unit`, which means no parameter.

The Result field shows the response `(LIST_EMPTY(), 0)`, which means that the storage value is now 0.

1. On the left side of the page, under **Actions**, click **Compile**, and in the Compile window, click **Compile** again.

If the compilation succeeds, the IDE prints the compiled code to the terminal and saves it to the file `build/contracts/Contract.tz`.
Expand Down

0 comments on commit f7aa9e7

Please sign in to comment.