This article was first published on Waves Platform - Medium
In this article I will show how to write simple decentralized appication(dApp) and run it on Waves node. We’ll take a look at the required development tools and good practices as well as a working example.
Development of a dApp is not(and should not be) radically different from development of a regular application: writing the code, writing automated tests, launching a dApp and testing it manually are the neccessary steps.
- docker for running a node and Waves Explorer
Technically, this step is not neccessary. You can use existing testnet / experimental-network, but unless you have your own node, your testing cycle will be dramatically slower because:
- You might(most likely you will) constanlty need new accounts with test tokens. The testnet faucet can give you just 10 WAVES every~10 minutes.
- Average block time on testnet is 1 minute, while on private node it’s just 15 seconds. This can be critical if your script requires several blocks confirmations.
- Public testnet nodes can have agressive caching turned on
- Public testnet nodes may be under maintenance
For the sake of simplicity, in this example we’ll assume you’re working with a private node.
2. surfboard command line tool:
- Donwload and install nodejs (via ppa, homebrew or exe) : https://nodejs.org/en/download/
- Install surfboard— a tool that will allow you to run your tests on existing node:
npm install -g @waves/surfboard
3. Visual Studio Code plugin waves-ride :
This step is not neccessary. If you are not a fan of IDEs and prefer plaintext editors — it’s not a problem, all the must-have tools are purely command-line utils. If you usevim — please checkout vim-ride plugin.
- Download and install Visual Studio Code: https://code.visualstudio.com/
- In VS Code, install a waves-ride plugin:
To keep reading, please go to the original article at:
Waves Platform - Medium