Posts: 28
Joined: Tue Mar 22, 2016 4:18 pm

Lisk - DApp in 10 minutes [OUTDATED]

Mon Apr 04, 2016 11:19 pm

DApp in 10minutes ? - Yes, with LISK

-Github account

Full node:

Prepare environment

Code: Select all

apt-get install git
ssh-keygen -t rsa (3x enter)
cd .ssh
cat id_rsa.pub

Copy key and submit it into github ssh keys section

Code: Select all

curl -sL https://downloads.lisk.io/scripts/setup_sqlite3 | sudo -E bash -
sudo apt-get install -y sqlite3

curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install -y nodejs

cd lisk-0.1.2-Linux-x86_64
bash lisk.sh stop

sudo npm install -g lisk-cli
if does not work, stuck or something
sudo npm install -g lisk-cli -verbose

lisk-cli -h

If we see help correctly from lisk-cli, then we can move on

At this time lisk-cli is designed only to create dapps in local testnet, it will overwrite local testnet and generate new genesis block. From what i have hear it will get improved in near feature

Code: Select all

lisk-cli dapps -a

Existing blockchain.db file will be replaced, are you sure?
Answer - Y

Enter secret of your testnet account
Our password to local testnet, for ex. "test123"

Overwrite the existing genesis block?
Answer - Y

Enter DApp name
name of app

Enter DApp description
description, obviously :D

Enter Github clone url
Here we need provide github url. At this time, unfortunately Lisk uses github as centralized storage, but it should be changed to ipfs, or maybe ipfs+github which is also great.

In this tutorial we will try to reproduce Max Kordek guestbookDapp
Let's log in into github
Click Fork
and then we will get redirected to something like this

then copy prepared .git url to lisk-cli configurator

Enter public keys of dapp forgers - hex array, use ',' for separator
Just click enter. Those keys are necessary to predefine forgers of our sidechain

Add DApp to autolaunch
Answer - Y.

After process ended we will receive dapp identifier
Done (DApp id is IDENTIFIER)

Code: Select all

cd dapps
git clone https://github.com/MaxKK/guestbookDapp
cp IDENTIFIER/genesis.json guestbookDapp/
mv guestbookDapp IDENTIFIER

Great, your dapp is ready

Code: Select all

node app.js

Additional information
/dapps/IDENTIFIER/genesis.json - our dapps genesis block
/dapps/IDENTIFIER/config.json - here we can add our predefined hardcoded peers

In main directory -> lisk-0.1.2-Linux-x86_64
We can review

Code: Select all

nano config.json

At the bottom we should be able to find our dapp and it's testnet password.

After we start our dapp, we should see in console that dapps blocks are being created in reference to Lisk blockchain
wpis.jpg (84.59 KiB) Viewed 2102 times

Let's go to Dappstore and check our dapp.
dapp.png (46 KiB) Viewed 2102 times

After we add our first entry we should see something like
sidechain_works.jpg (170.07 KiB) Viewed 2102 times

This dapp will work on our local test-net, if we decide to move app to public test-net or main-net, we do everything the same way, but we need to create dapp in Lisk web interface, we pay 500 LISK, configure github repo and icon, remember to define your peers in dapp config.json and genesis.block. Currently it's quite unclear and complicated, but im pretty sure it will be improved.
Not worth to write more now, since i guess this process will get much more clear in near future.
Last edited by karek314 on Mon Jul 24, 2017 3:20 pm, edited 1 time in total.

User avatar
Posts: 303
Joined: Wed Jan 20, 2016 7:59 pm
Location: Berlin
Contact: Website Twitter

Re: Lisk - DApp in 10 minutes

Tue Apr 05, 2016 7:47 am

Awesome. :)
Please take a look at the Community Fund. It's an important project!

User avatar
Posts: 23
Joined: Sat Jan 30, 2016 9:23 am

Re: Lisk - DApp in 10 minutes

Tue Apr 05, 2016 9:00 pm

Great work karek314! :)

Posts: 3
Joined: Sat Apr 02, 2016 3:53 pm

Re: Lisk - DApp in 10 minutes

Tue Apr 26, 2016 5:50 pm

just want to note that the github url should be git@github.com:USERNAME/guestbookDapp.git and not git@github.com/USERNAME/guestbookDapp.git
: after com

Posts: 5
Joined: Thu Jan 26, 2017 9:37 am

Re: Lisk - DApp in 10 minutes

Tue May 02, 2017 2:40 am

good tutorial. we need more like this.

Posts: 28
Joined: Tue Mar 22, 2016 4:18 pm

Re: Lisk - DApp in 10 minutes [OUTDATED]

Mon Jul 24, 2017 3:21 pm

As for now, this guide is for sure outdated as we are waiting for new SDK release. Maybe it would be nice thing to actually unpin this one for a while as it may be confusing for new people coming around. If i will have some free time after SDK release, i would love to write new tutorial.

Return to “Lisk App SDK”

Who is online

Users browsing this forum: No registered users and 0 guests