This is a starter project kit for Ethereum Projects.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node js (We need this to install truffle and testrpc)
- Testrpc - In memory Blockchain
- Metamask - Helps run DApp in the browser itself.
- Truffle Latest Version - Development Environment
-
Sign In to Paperspace(https://www.paperspace.com) with Username: your email id and Password: your phone number
-
For Ubuntu/Mac - open Terminal and connect with - ssh paperspace@(your public ip ex:72.52.111.97) -L 8080:localhost:8080
a. For further installations on paperspace linux vm,follow the installations steps from Case 2 : Ubuntu 16.04
-
For Windows:
a. Download putty from https://www.putty.org/
b. To configure SSH tunnel on putty follow - https://blog.devolutions.net/2017/4/how-to-configure-an-ssh-tunnel-on-putty
c. For port forwarding follow - https://intranet.cs.hku.hk/csintranet/contents/technical/howto/putty-portforward.jsp
d. For further installations on paperspace linux vm,follow the installations steps from Case 2 : Ubuntu 16.04
Case 1 : Windows 10
- Go to (https://nodejs.org/en/) to install nodejs.
**Note : Run command prompt as administrator for installation **
- Install the tools via npm:
Open a NEW PowerShell prompt as Administrator (to ensure that it reloads), then run the following commands:
# npm install -g npm
# npm install -g -production windows-build-tools
# npm install -g ethereumjs-testrpc
# npm install -g truffle
- Install webpack && webpack-dev-server
# npm install -g webpack
# npm install -g webpack-dev-server
-
Install Metamask for Chrome
-
Go to : (https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en)
-
Click on Add to Crome as shown in below image.
-
Click on Metamask plugin
-
Create New Password
- Save Seedwords
Case 2 : OS : Ubuntu 16.04 and 18.04
First, update and install packages
# sudo apt-get update && sudo apt-get -y upgrade
# sudo apt-get -y install curl git vim build-essential
Install NodeJs to execute the DAPP
# curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# sudo apt-get install -y nodejs
# sudo npm install -g express
Install Truffle packages
# sudo npm install -g truffle
testprc uses ethereumjs to simulate full client behavior and make developing Ethereum
# sudo npm install -g ethereumjs-testrpc
# testrpc -m "Your browser seedwords for metamask"
- Go to : (https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en)
- Click on Add to Crome as shown in below image.
- Click on Metamask plugin
- Create New Password
- Save Seedwords
# npm install -g webpack
# npm install -g webpack-dev-server
-
git clone https://github.com/shalmali86/Starter_kit.git && cd Starter_kit
-
npm install
-
truffle compile // This step will create build folder.
-
Open Terminal2 / Another Command promt
-
Start testrpc by command -> testrpc -m "seedwords of Metamsk"
-
truffle migrate //migrate smart contract to running blockchain
-
npm run dev // To run the application in browser
-
open "http://localhost:8080" in web browser
-
Enter value for 3 text boxes for pricipal , period , rate
-
Click on Calculate button
-
Metamask will open notification window
-
Accept transaction.
-
See result as interest.
Thank you!