description | icon |
---|---|
A tutorial setting you up to build, run, and test your first Anoma application. |
rocket-launch |
Before creating your first Anoma dApp, make sure to have Juvix installed.
The goal of this tutorial is to
- Define a "Hello World!" Resource.
- Add a resource label.
- Write a transaction function initializing the resource.
Let's fly through the project setup by typing the following in our terminal.
{% code title="~/" %}
mkdir HelloWorld
cd HelloWorld
juvix init
{% endcode %}
In the following chapter, we're going to construct the scaffolding of the resource object and add our custom label.
Once the Juvix project is created, we want to change the Package.juvix
file to the following:
{% code title="HelloWorld/" %}
module Package;
import PackageDescription.V2 open;
package : Package :=
defaultPackage@{
name := "simple-hello-world";
dependencies :=
[
github "anoma" "juvix-stdlib" "v0.10.1";
github "anoma" "anoma-applib" "v0.7.2";
github "anoma" "juvix-mtl" "v0.2.1";
];
};
{% endcode %}
Let's start with some Juvix code. We will first define an Anoma resource.