To check that Node is installed properly, open a console (admin PowerShell on Windows) and type node -v. This should print a version number, like v10.15.0.
To test npm, type npm -v and you should see the version number, like 6.4.1.
Getting Started: Installation
Truffle Framework is a great tool for developing Dapps. You can use Truffle to deploy your smart contracts to TomoChain.
We only need this single command to install Truffle, the popular development framework for Ethereum.
npm install -g truffle
You can verify that Truffle is correctly installed typing truffle version.
Creating a Truffle project
Truffle initializes in the current directory, so first create a directory in your development folder of choice and then move inside it.
mkdir pet-shop-tutorialcd pet-shop-tutorial
Let’s see how to create a Truffle project.There are two options. You can create a bare new project from scratch with no smart contracts included, and the other option for those just getting started, you can use Truffle Boxes, which are example applications and project templates.
Pet Shop Truffe Box
There is a special Truffle Box for this tutorial called pet-shop, which includes the basic project structure as well as code for the user interface. Use the truffle unbox command to unpack this Truffle Box:
truffle unbox pet-shop
The default Truffle directory structure contains a series of folders and files. If you want to know more, please check Truffle tutorials.
Note: This tutorial is focused on the whole process to build a Dapp on TomoChain, so we will not enter into all the details.
Creating a TOMO Wallet
You will need a wallet address and some tokens. We will show you how to do it on both TomoChain Testnet and Mainnet.
1. Create a TOMO wallet and save your Mnemonic
You can create a new TOMO wallet using TomoWallet mobile app for iOS, or the web version (https://wallet.tomochain.com/#/login). Under Settings go to Advanced Settings, here you can Choose network and select TomoChain TestNet or TomoChain [mainnet].
Go to Settings menu, select Backup wallet and then Continue. Here you can see your wallet’s private key and the 12-word recovery phrase. Write down the 12-word recovery phrase.