Write your first Cardano Hello world in just 10 minutes

Cherry Byte Technologies

--

Get started with cardano

Introduction

Starting out Cardano can be daunting when you don’t know the right place to start.

Cardano ecosystem is just in the development stages with not much of the support as we would see in Ethereum, Solana and other popular Blockchain ecosystems.

If you are struggling with getting started , this is your home for Cardano.

Let’s quickly get to the good stuff

Configure Demeter

1. Creating your project

we’ll be using an online development setup for developing stuff because it comes with a lot of pre-configured things like cardanol node and nix which are not easy to setup on local machines.

  • Go to https://demeter.run/ and create a free account.
  • After creating an account , your project section might look like this

Don’t worry if you don’t have any project here. you can create one.

  • Create a new project by clicking “New Project +” Button
  • Put the name and description as hello world
  • Select any Cluster and organization of your choice and hit “Build project”.

Your project has been created.

2. Setting up your project

Now go to your “Projects” tab and you’ll see your currently created project.

Click on the “Open” button and you’ll see something like this :

Click on “Create New” button in-front of workloads heading.

Select Workspace .

  • Now , scroll below select following
    - “Plutus Tx” as tool chain.
    - “Large” as workspace size
    - “preview” network to connect
  • Click on the create button.

You will see something like this :

  • Wait for provisioning to end.
  • Till then scroll down to “connected extensions”, click browse and select “cardano node” on “preview” network to add it to our development environment.
  • After adding Cardano node , Go to dashboard again and wait for provision to end again.
  • Now you will see something like this
  • Click on the right arrow to explore the workload of our project
  • After provisioning ends , the screen will look like this :
  • Time to click on the vscode icon and open the workplace.
  • Open up the new terminal in the new in-browser vscode window and type cd code/Week02` in terminal to switch working directory to Week02’s code.
  • Run `cabal update` and wait for 2–6 minutes or less to finish it.
  • Now run `cabal repl` in the terminal and wait it to finish( This will take time e.g ~ 10–20 minutes or maybe more . let it take ).
    These commands will install everything we need to get stuff running
  • If following pop-up shows , just click on “Automatically via ghcp”.
  • Side Note : — Make sure to stop your workload if you are not using it cause it will eat up your DCUs .
  • Now when the cabal repl` finishes it’s execution , you’ll see a screen like this.
  • Now type this in terminal print "hello world"`.
  • Aaandd , Congratulations 👀🎊
    you just ran your first ever Cardano Hello world program 🎊🥳

Recap

In this lesson , we configured our development setup using

  • Demeter Platform , an online IDE for building on Cardano
  • Input-Output-HK repository for getting things started.

And That’s it.

What’s Next ?

In the next tutorial , we’ll write our first ever smart contract in haskell.

So, just gear up for that !

Let’s see each other in the next lesson !

Thanks for reading !

If you have faced any problems , reach out to us at Twitter

Until next time!

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Cherry Byte Technologies
Cherry Byte Technologies

Written by Cherry Byte Technologies

Building scalable web2 and web3 products | Blockchain | MERN | React | Node | Flutter| UI\UX | Reach out to us

No responses yet

Write a response