diff --git a/docs/tutorials/dapp.md b/docs/tutorials/dapp.md index 468f3d08c..6449881bf 100644 --- a/docs/tutorials/dapp.md +++ b/docs/tutorials/dapp.md @@ -1,8 +1,8 @@ --- title: Create your minimum dapp on Tezos -authors: 'Benjamin Fuentes (Marigold)' +authors: 'Benjamin Fuentes' last_update: - date: 27 November 2023 + date: 29 October 2024 --- > dApp : A decentralized application is a type of distributed open source software application that runs on a peer-to-peer (P2P) blockchain network rather than on a single computer. DApps are visibly similar to other software applications that are supported on a website or mobile device. @@ -33,8 +33,8 @@ This tutorial uses Typescript, so it will be easier if you are familiar with Jav 1. Make sure that you have installed these tools: - - [Node.JS and NPM](https://nodejs.org/en/download/): NPM is required to install the web application's dependencies. - - [Taqueria](https://taqueria.io/), version 0.45.0 or later: Taqueria is a platform that makes it easier to develop and test dApps. + - [Node.JS and NPM](https://nodejs.org/en/download/): NPM is required to install the web application's dependencies and node version >=20 + - [Taqueria](https://taqueria.io/), version 0.62.0 or later: Taqueria is a platform that makes it easier to develop and test dApps. - [Docker](https://docs.docker.com/engine/install/): Docker is required to run Taqueria. - [jq](https://stedolan.github.io/jq/download/): Some commands use the `jq` program to extract JSON data. - [`yarn`](https://yarnpkg.com/): The frontend application uses yarn to build and run (see this article for details about [differences between `npm` and `yarn`](https://www.geeksforgeeks.org/difference-between-npm-and-yarn/)). @@ -51,6 +51,6 @@ The application looks like this: ![Example of the table of addresses and which addresses poked them](/img/tutorials/dapp-table.png) -The code for the completed application is in this GitHub repository: [solution](https://github.com/marigold-dev/training-dapp-1/tree/main/solution) +The code for the completed application is in this GitHub repository: [solution]( https://github.com/trilitech/tutorial-applications/tree/main/training-dapp-1) When you're ready, move to the next section [Create your minimum dApp on Tezos](/tutorials/dapp/part-1) to begin setting up the application. diff --git a/docs/tutorials/dapp/part-1.md b/docs/tutorials/dapp/part-1.md index ef5da823e..95205e98a 100644 --- a/docs/tutorials/dapp/part-1.md +++ b/docs/tutorials/dapp/part-1.md @@ -1,8 +1,8 @@ --- title: 'Part 1: Create your minimum dApp on Tezos' -authors: 'Benjamin Fuentes (Marigold)' +authors: 'Benjamin Fuentes' last_update: - date: 22 May 2024 + date: 29 October 2024 --- To start working with the application, you create a Taqueria project and use it to deploy the Poke contract. @@ -97,7 +97,7 @@ The LIGO command-line provides sub-commands to test your LIGO code. 1. Compile the contract with Taqueria (Force to use a specific LIGO version with `TAQ_LIGO_IMAGE` Taqueria environment variable). ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` Taqueria is generating the `.tz` Michelson file in the `artifacts` folder. The Michelson language is the default stack language used by the Michelson VM to run your code on a node. It is something similar to WASM. @@ -119,7 +119,7 @@ The LIGO command-line provides sub-commands to test your LIGO code. 1. Compile all (contract + initial storage) ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` It compiles both source code and storage. @@ -138,7 +138,7 @@ The LIGO command-line provides sub-commands to test your LIGO code. ```bash taq install @taqueria/plugin-octez-client - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo taq simulate pokeGame.tz --param pokeGame.parameter.default_parameter.tz ``` diff --git a/docs/tutorials/dapp/part-2.md b/docs/tutorials/dapp/part-2.md index f4a67734d..ce4484317 100644 --- a/docs/tutorials/dapp/part-2.md +++ b/docs/tutorials/dapp/part-2.md @@ -1,6 +1,6 @@ --- title: 'Part 2: Inter-contract calls and testing' -authors: 'Benjamin Fuentes (Marigold)' +authors: 'Benjamin Fuentes' last_update: date: 22 May 2024 --- @@ -27,13 +27,13 @@ sequenceDiagram ## Get the code -Get the code from the first session: https://github.com/marigold-dev/training-dapp-1/blob/main/solution +Get the code from the first session: https://github.com/trilitech/tutorial-applications/tree/main/training-dapp-1 ```bash -git clone https://github.com/marigold-dev/training-dapp-1.git +git clone https://github.com/trilitech/tutorial-applications.git ``` -Reuse the code from the previous smart contract: https://github.com/marigold-dev/training-dapp-1/blob/main/solution/contracts/pokeGame.jsligo +Reuse the code from the previous smart contract: https://github.com/trilitech/tutorial-applications/tree/main/training-dapp-1/contracts/pokeGame.jsligo Install all libraries locally: @@ -103,7 +103,7 @@ sequenceDiagram 1. Compile your contract. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` Write a second function `pokeAndGetFeedback` involving the call to another contract a bit later, let's do unit testing first! @@ -213,7 +213,7 @@ sequenceDiagram 1. Run the test ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq test unit_pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq test unit_pokeGame.jsligo ``` The output should give you intermediary logs and finally the test results. @@ -329,7 +329,7 @@ The function to call on the second contract is `GetFeedback: (contract_callback: 1. Compile the contract. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` 1. (Optional) Write a unit test for this new function `pokeAndGetFeedback`. @@ -397,7 +397,7 @@ sequenceDiagram 1. Compile the contract. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` 1. (Optional) Write a unit test for the updated function `pokeAndGetFeedback`. @@ -479,7 +479,7 @@ The higher the percentage of mutants killed, the more effective your tests are. 1. Run the test. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq test mutation_pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq test mutation_pokeGame.jsligo ``` Output: @@ -531,7 +531,7 @@ The higher the percentage of mutants killed, the more effective your tests are. 1. Run again the mutation tests. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq test mutation_pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq test mutation_pokeGame.jsligo ``` Output @@ -557,14 +557,14 @@ The higher the percentage of mutants killed, the more effective your tests are. ## Update the frontend -1. Reuse the dApp files from [the previous session](https://github.com/marigold-dev/training-dapp-1/tree/main/solution/app). +1. Reuse the dApp files from [the previous session](https://github.com/trilitech/tutorial-applications/tree/main/training-dapp-1/app). 1. Redeploy a new version of the smart contract. > Note: You can set `feedback` value to any action other than default `kiss` string (it is more fun for other to discover it). ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo taq generate types ./app/src taq deploy pokeGame.tz -e "testing" ``` diff --git a/docs/tutorials/dapp/part-3.md b/docs/tutorials/dapp/part-3.md index d7712e041..03a3902b0 100644 --- a/docs/tutorials/dapp/part-3.md +++ b/docs/tutorials/dapp/part-3.md @@ -1,6 +1,6 @@ --- title: 'Part 3: Tickets' -authors: 'Benjamin Fuentes (Marigold)' +authors: 'Benjamin Fuentes' last_update: date: 22 May 2024 --- @@ -31,9 +31,9 @@ sequenceDiagram ## Prerequisites -Prerequisites are the same as the first session: https://github.com/marigold-dev/training-dapp-1#memo-prerequisites. +Prerequisites are the same as the first session: https://docs.tezos.com/tutorials/dapp#prerequisites. -Get the code from the session 2 solution [here](https://github.com/marigold-dev/training-dapp-2/tree/main/solution). +Get the code from the session 2 solution [here](https://github.com/trilitech/tutorial-applications/tree/main/training-dapp-2). ## Tickets @@ -221,7 +221,7 @@ Minting is the action of creating a ticket from the void. In general, minting op ```bash npm i - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` Check on logs that everything is fine. @@ -237,7 +237,7 @@ Minting is the action of creating a ticket from the void. In general, minting op 1. Compile again. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` This time you should see the `DUP` warning generated by the **find** function. @@ -368,7 +368,7 @@ Update the unit test files to see if you can still poke. 1. Run the test, and look at the logs to track execution. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq test unit_pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq test unit_pokeGame.jsligo ``` The first test should be fine. @@ -408,7 +408,7 @@ Update the unit test files to see if you can still poke. Let's play with the CLI to compile and deploy. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo taq generate types ./app/src taq deploy pokeGame.tz -e testing ``` diff --git a/docs/tutorials/dapp/part-4.md b/docs/tutorials/dapp/part-4.md index de1409c7e..a9d6a5495 100644 --- a/docs/tutorials/dapp/part-4.md +++ b/docs/tutorials/dapp/part-4.md @@ -1,6 +1,6 @@ --- title: 'Part 4: Smart contract upgrades' -authors: 'Benjamin Fuentes (Marigold)' +authors: 'Benjamin Fuentes' last_update: date: 22 May 2024 --- @@ -19,9 +19,9 @@ Let's see some tricks that allow you to upgrade a contract. # Prerequisites -There is nothing more than you need on the first session: https://github.com/marigold-dev/training-dapp-1#memo-prerequisites. +There is nothing more than you need on the first session: https://docs.tezos.com/tutorials/dapp#prerequisites. -Get the code from the session 3 or the solution [here](https://github.com/marigold-dev/training-dapp-3/tree/main/solution). +Get the code from the session 3 or the solution [here](https://github.com/trilitech/tutorial-applications/tree/main/training-dapp-3). # Upgrades @@ -262,7 +262,7 @@ It is required to: ```bash npm i - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` 1. Redeploy to testnet @@ -310,7 +310,7 @@ It is required to: 1. Compile all and call an init transaction. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo taq call pokeGame --param pokeGame.parameter.default_parameter.tz -e testing ``` @@ -706,7 +706,7 @@ sequenceDiagram 1. Compile. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo ``` All good. @@ -928,7 +928,7 @@ sequenceDiagram 1. Compile. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile proxy.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile proxy.jsligo ``` #### Deployment @@ -950,7 +950,7 @@ sequenceDiagram 1. Compile and deploy it. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile proxy.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile proxy.jsligo taq deploy proxy.tz -e testing ``` @@ -985,7 +985,7 @@ sequenceDiagram 1. Deploy the underlying V1 contract. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo taq deploy pokeGame.tz -e testing ``` @@ -1073,7 +1073,7 @@ sequenceDiagram 1. Compile & Call it. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile proxy.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile proxy.jsligo taq call proxy --param proxy.parameter.initProxyWithV1.tz -e testing ``` @@ -1102,8 +1102,8 @@ sequenceDiagram 1. Go on the frontend side, recompile all, and generate typescript classes. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile proxy.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile proxy.jsligo taq generate types ./app/src ``` @@ -1406,7 +1406,7 @@ sequenceDiagram ``` ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile pokeGame.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile pokeGame.jsligo taq deploy pokeGame.tz -e testing --storage pokeGame.storage.storageV2.tz ``` @@ -1492,7 +1492,7 @@ sequenceDiagram 1. Call the proxy to make the changes. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile proxy.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile proxy.jsligo taq call proxy --param proxy.parameter.initProxyWithV2.tz -e testing ``` @@ -1549,7 +1549,7 @@ sequenceDiagram 1. Compile. ```bash - TAQ_LIGO_IMAGE=ligolang/ligo:1.6.0 taq compile proxy.jsligo + TAQ_LIGO_IMAGE=ligolang/ligo:1.7.0 taq compile proxy.jsligo taq call proxy --param proxy.parameter.changeVersionV1ToV2.tz -e testing ```