Skip to main content

Setting Up

Dependencies

In this guide we'll be using docker and nodejs and whatever else I come up with.

Installing Dependencies

Install docker from: https://docs.docker.com/engine/install/ubuntu/

Install nodejs from nodesource: (other options are also okay)

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

Installation

Start From a Template

First, let's clone our template project. Go to our hardhat template repository and click "use this template". Choose your new project name and set up a repository.

Help, I can't find the button!

Now clone your new repository, or open a cloud-based environment such as Github Workspaces.

git clone https://github.com/your/repository.git

Change directory into the repository and install the project dependencies

npm install

I'm more of a Free Spirit

Alternative set up paths can be just cloning or forking the example repository, or starting from scratch using our fhenix hardhat plugin, Gitpod environment or Github Workspaces

Starting Localfhenix

npm run hardhat localfhenix:start

You should see input similar to the following:

> fhenix-hardhat-example@1.0.0 localfhenix:start
> hardhat localfhenix:start

Downloading docker image ghcr.io/fhenixprotocol/localfhenix:v0.1.0-beta5...

Wait about a minute for the image to finish downloading, after which you should see a success message:

Downloading docker image ghcr.io/fhenixprotocol/localfhenix:v0.1.0-beta5...
done!
Started LocalFhenix successfully at 127.0.0.1:42069

And now we have a fhenix blockchain environment running locally! Now we have everything ready, and we can move to coding :)

note

If you want to make sure the container is running, you can use docker ps to see the container, available ports, etc.