Skip to content

wafflepool-cardano/EmurgoAcademyPlutusExamples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Plutus Developer Environments

We have 4 options for developer environments:

  • Demeter.run Plutus Stack
  • Local Developer Environment based on Plutus Application Framework
  • Docker Developer Environment based on IOH Plutus Pionneers Program Cohort 4 resources.
  • Jambhala simplified local developer environment.

Demeter.run

  1. Open a Demeter.run account.
  2. Create a new project.
  • Choose organization
  • Select cluster region
  • Select Price Plan (Free tier is enough)
  • Fill project name and description
  • CREATE
  1. Create a new workload

######Wait for priviosioning...

  1. Open VSCode
  2. Navigate to folder 1_JustValidators and open a terminal or viceversa.
  3. Test
        cabal update
        cabal repl

You should see the very nice prompt of the REPL

Prelude AlwaysSucceedandFail>

Local developer environment

This guide was last tested with Ubuntu 22.04.2 LTS, other versions and platforms might not be exactly the same.

We recommend gNome desktop so you can use google chrome web wallets extensions like Nami

1.Recommended machine hardware:

  • cpu:
    • minimun: 2 cores
    • recommended: 4 cores
  • ram:
    • minimun: 16 GB
    • recommended: 32GB
  • storage:
    • minimun: 64GB
    • recommended: 120GB (with full testnet node installation)

Native boot will work faster for all the below steps. Everything stays the same whether it's a VM or a native boot Ubuntu

You need a tool to retrieve files form the internet, like curl or wGet (this guide use curl), git and a text editor (this guide use nano for console, popular option is VScode for gui desktop).

  1. Execute:
        sudo apt-get update
        sudo apt-get upgrade
        sudo apt-get install -y snap git nano curl

Install Nix

  1. Execute
        curl -L https://nixos.org/nix/install > install-nix.sh
        chmod +x install-nix.sh
        ./install-nix.sh

To ensure that the necessary environment variables are set, either log in again, or type

        . ~/.nix-profile/etc/profile.d/nix.sh

More advanced installations of nix can be found in https://nixos.org/download.html, but we haven't tested them so feel free to explore on your own.

  1. verify installations with --version Execute
        nix --version
        git --version
        nano --version

IOG Binary Cache

  1. IOHK Binary Cache (necesary for saving hours of time in the Plutus Libraries installation)

Execute:

    sudo mkdir -p /etc/nix
    sudo nano /etc/nix/nix.conf

Include on the open file this:

experimental-features = nix-command flakes
substituters        = https://cache.iog.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=

(Reference: In nano editor, You can Save with Ctrl-O and close the file with Ctrl-X)

Setup PLUTUS-APPS

7.Clone the Plutus-Apps repository Execute

    git clone https://github.com/input-output-hk/plutus-apps.git
    cd plutus-apps/
    git checkout tags/v1.1.0
  1. Now, Launch the nix-shell
        nix-shell
        cabal update
  1. Clone Emurgo Academy Plutus Examples repository
        git clone https://github.com/Vortecsmaster/EmurgoAcademyPlutusExamples.git
  1. Quick test

Building the Plutus Documentation

Navigate to the plutus-apps folder and open another nix-shell Execute

   build-and-serve-docs

This will build the plutus documentation. Once it is running, open up your browser and navigate to http://0.0.0.0:8002/haddock. If this site doesn't work, navigate to http://localhost:8002/haddock

About

Cardano Developers Professional Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 47.5%
  • Haskell 40.0%
  • Shell 10.3%
  • Dockerfile 1.3%
  • Other 0.9%