Histopia-lisk application, Milestone 2–3

Histopia.io
6 min readNov 29, 2022

--

During the last 2 months we’ve been working on Histopia lisk application which is a standalone testnet blockchain now and hopefully will become a side-chain of lisk blockchain in future through the grant program.

In this article, we will talk about the Histopia Lisk application and deep dive into it to see how it is look like under the hood.

What is Histopia-lisk application

Histopia is a complex multi-chain system which is comprised of multiple components. Each component play an crucial role to increase the stability and security of the system and also improve the user experience.

Histopia-lisk application is a blockchain application created using Lisk SDK. At the moment it is a standalone testnet blockchain but we are planning to connect it to Lisk chain as a side chain to tackle the scalability issues.

Histopia-lisk application under the hood

There are multiple modules that have been used in Histopia-lisk application.

  • NFT module: Manages the ownership of non-fungible assets in Histopia (Characters, lands, …). We’ve implemented the NFT module as this LIP describes with small modifications to fit our use-case.
  • FoE module: responsible for executing Proof of military mechanism. [Will be implemented in 2nd milestone]
  • Gate module: This module handles the Histopian teleport and ERA transfer between other chains and Histopia-Lisk app.[Will be implemented in 3rd milestone]
  • Lisk planet module: responsible for interactions with lisk planet (resources and mini-games) and also micro-transactions between users

Also we’ve used multiple plugins to enhance user and developer experience (HTTPAPIPlugin, DashboardPlugin, FaucetPlugin)

NFT module specification:

NFTs are really well known entities in blockchain space. In lisk blockchain application we implemented the NFTs based on this LIP. In this module users are able to create, transfer and destroy their nft assets.

In Histopia NFT module, each NFT has some properties which will be calculated randomly at the mint time. These properties are defined based on the type of that NFT.

We can define different types and for each type we specify what are the properties and what is the range of these properties. For example this is the stored data for the type of Histopian.

This can be used as a blueprint to create a new Histopian NFT.

At the mint time, random numbers between the minimum and maximum for that property will be assigned to the NFT properties.

So the NFT properties structure will be like this example.

{
"id": 1,
"typeId": 0,
"ownerAddress": "lskfo5947vnkpzea*********qthrsyz9b8p9",
"nftProperties": [
{
"name": "speed",
"amount": 50
},
{
"name": "strength",
"amount": 79
},
{
"name": "luck",
"amount": 28
},
{
"name": "intelligence",
"amount": 69
},
{
"name": "charisma",
"amount": 84
}
]
}

ChainStateStore structure:

We store 4 category of data on StateStore

Assets:

We use assets to define different interactions with the NFT module

  1. AddType: This transaction will create a new type and will add it to the state store. Only the owner address (which is stored in System Data) can call this function.
  2. Create: Users can call this asset and create new NFTs. Users need to specify the number and type of the desired NFT. This asset will deduct the mint fee from their account and will mint a new NFT and calculate its properties based on the type blueprint.
  3. Transfer: Users can use this asset to transfer the ownership of their token to another address.
  4. Destroy: Users can use this asset to burn (destroy) their token. By doing so, the NFT data will be removed from StateStore.

You can access the Histopia blockchain app using the dashboard plugin here

Also you can access the source code here

Final notes about our experience with Lisk SDK

Building with Lisk SDK is pretty straightforward (specially with the tutorials in lisk documentation) but I think we are still missing open source examples and code snippets that are a great source of learning for developers who are trying to learn a new paradigm. I really liked the layered structure of applications created by lisk SDK.

Another problem that we faced during the development was errors without proper and complete explanation; for example at some point when I wanted to add something to the userAccount storage I got “must be greater than 3” or “must not be zero” errors and there was no explanation about which field has this problem.
Also I think it makes sense that we get access to “channel” in assets (I don’t know if the lisk devs have thought about this or not. it’s just a recommendation) since I needed to send events when I was in the middle of handling a transaction not when it’s finished.

The frontend and user interface

public on https://histopia.io/

In the current version of the frontend of Histopia, users can create new NFTs and customize the Histopian NFTs as they wish.

To start using the Histopia Lisk chain, users need to create or import an account into the internal wallet of Histopia.

User credentials (passphrase) are end-to-end encrypted and stored on local storage (on the user’s computer, not the backend)

After that, get some Faucet to be able to execute the mint transaction.

Once you get enough ERA from the faucet to send a transaction, you can mint your first Histopian for free by doing social tasks.

By doing so, the frontend will create a transaction and sign it using the passphrase of the selected account and send it to the Histopia lisk application.

After the transaction is complete you can see the Histopian NFT in your village.

This is your first Histopian on Histopia-Lisk chain. You can customize your characters look.

Development roadmap

We are planning to bring lots of cool features to Histopia lisk application in three steps as described below. We have already completed the first step.

Three in-between goals of milestone 3 of Histopia-lisk grant program:

1. First and the most important, we are finalizing the NFT module of the application and connecting it to Histopia Village Dashboard so users will be able to mint and customize their Histopian. In addition, we have developed our first Histopia Lisk internal wallet, which makes it easier for our users to use Histopia dashboard.

2. Next step is about the Fountain of ERA (FoE) module and the metaverse integration.

FoE protocol is one of the key components of Histopia, which will allow users to earn ERA by participating in proof of military (PoM) mechanism. Also after this step, users can participate in Histopia testnet campaign to compete with other chains and earn up to 5000$ worth of ERA token.

We will also connect Histopian characters to Histopia Metaverse. Thus, users with Histopian NFTs can traverse Histopian world, socialize with other communities, and play minigames.

3. In the third step we are planning to work on Lisk planet (3D traversable world) with new unique customization for Histopians of Lisk planet.

In this step we also aim to make the Histopia-lisk application compatible with Histopia Gate.
Histopia Gate is our in-door bridging system that allows users to teleport their Histopians (nfts) and also their ERA token to/from different chains.

In addition, We will design and implement a unique page for each Histopians so they can share their NFT profile to everyone easily and also list their Histopians for sale.

Please keep tuned for the next update where you can traverse Histopia world using your NFT and participate in Fountain of ERA

Twitter: https://twitter.com/Histopia_io
Discord: https://discord.com/invite/VB2kB2jGts
Telegram Chat: https://t.me/histopia_io

--

--

Histopia.io

Histopia is a Multi-Era MMORPG MetaVerse, started from The Iron Age, developed for web browsers #NFT #metaverse