stephen-rowan / Plutus-Pioneer-Program

Repository for Plutus Coursework
Apache License 2.0
0 stars 0 forks source link

Week 1 - Exercises #1

Open stephen-rowan opened 3 years ago

stephen-rowan commented 3 years ago

Week 1 - Exercises

Build the English Auction contract with cabal build (you may need to run cabal update first).

Clone the The Plutus repository, check out the correct commit as specified in cabal.project.

Set-up IOHK binary caches How to set up the IOHK binary caches. "If you do not do this, you will end up building GHC, which takes several hours. If you find yourself building GHC, STOP and fix the cache."

Enter a nix-shell.

Go to the plutus-playground-client folder.

Start the Playground server with plutus-playground-server.

Start the Playground client (in another nix-shell) with npm run start.

Copy-paste the auction contract into the Playground editor - don't forget to remove the module header!

Compile.

Simulate various auction scenarios.

stephen-rowan commented 3 years ago

Windows Setup - SUCCESS

Getting Started with Vagrant on Windows

https://www.sitepoint.com/getting-started-vagrant-windows/

tmux

https://www.poftut.com/split-create-close-tmux-screen-linux/

Cardano Academy

https://tutorials.cardanoacademy.io/setting-up-plutus-playground/starting-plutus-playground

Plutus VM (Ubuntu Based)

http://docs.plutus-community.com/docs/setup/Vagrant.html

https://github.com/edwint88/plutus-vm

Vagrant & VirtualBox for plutus playground

stephen-rowan commented 3 years ago

Ubuntu Setup (FAILED)

Source - http://docs.plutus-community.com/docs/setup/Ubuntu.html

Ubuntu setup for Plutus Playround

Steps

sudo mkdir -p /etc/nix/ mkdir -p ~/.config/nix sudo touch /etc/nix/nix.conf touch ~/.config/nix/nix.conf

(Note: editing /etc/nix/nix.conf required sudo)

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=

nix build -f default.nix plutus.haskell.packages.plutus-core

nix-shell cd plutus-playground-server plutus-playground-server

Setup failed at Step 8 - either nix-shell failed to complete or npm run start

Possible Reasons - WiFi connection (my connection not reliable), ThinkPad X200 ran out of memory (the machine slowed down after installation - even after a minimal image install of Ubuntu 20.04 LTS.