Skip to main content

Gitpod

If you're more of a cloud-based developer, you can skip all the installation steps and work directly with our Gitpod environment. This environment includes a LocalFhenix instance and all the tools you need to dive in.

Usage

You can run an instance of LocalFhenix in Gitpod by clicking here.

After opening the Gitpod container and starting up the instance, you will be greeted with the following terminal:

Please wait for about 60 seconds for the image to be downloaded and localfhenix to be started. Once the container is ready, you will see the following message:

Now that we are ready, you can use the pre-configured contract to interact with the LocalFhenix instance. You can find the contract in the contracts folder.

Deploy a contract

To deploy a contract, you can use the following command:

npx hardhat deploy

Interact with a contract

Send a transaction

To interact with our counter contract, you can use the predefined hardhat tasks:

npx hardhat task:addCount --amount 10

View Functions

To view the current count, you can use the following command:

npx hardhat task:getCount

If everything was successful, you should see output similar to the following:

gitpod /workspace/fhenix-hardhat-example (master) $ npx hardhat task:getCount
Running getCount, targeting contract at: 0xbeb4eF1fcEa618C6ca38e3828B00f8D481EC2CC2
got count: 10
got unsealed result: 10

Next Steps

To learn more about the Fhenix Hardhat Plugin, please visit the Fhenix Hardhat Plugin or learn more about Developing dApps with Fhenix.