Setting up the Plutus Playground
This tutorial helps you to setup the Plutus Playground and matches the playground version that is used in the third iteration of the Plutus Pioneer Program.
Install Nix
- Use the steps outlined on the official Nix page
- Make sure Nix is installed correctly using
nix --version
Edit the /etc/nix/nix.conf
Open the file with the editor of your choice and add the following lines to the file (create the file if it does not exists).
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
Download the plutus-apps repository
git clone https://github.com/input-output-hk/plutus-apps
Choose the version of the Plutus Playground
If you're following the Plutus Pioneer Program you will need to select the commit hash of the Plutus repository, as shown in the following table:
Lecture | Iteration 3 |
---|---|
Week 1 | 3746610e53654a1167aeb4c6294c6096d16b0502 |
Week 2 | 6aff97d596c9d59460aab5c65627b1c8c0a1528 |
Week 3 | 4edc082309c882736e9dec0132a3c936fe63b4ea |
Week 4 | ---------------------------------------- |
Week 5 | 4edc082309c882736e9dec0132a3c936fe63b4ea |
Then select the commit hash using the command git checkout <commit-hash>
(for example git checkout 3746610e53654a1167aeb4c6294c6096d16b0502
for the lecture of week 1 of the third iteration).
Open a nix shell and start the server
Open a nix-shell with the command nix-shell
cd plutus-playground-client
Start the server using plutus-playground-server
Open a new terminal and run the client
Open a new terminal, go to the plutus-apps repository and run nix-shell
.
Go to the plutus-playground-client folder: cd plutus-playground-client
.
Finally run the client using npm run start
.
Open the Plutus Playground
Finally the Plutus Playground will be available in https://localhost:8009