Skip to content

Decentralised blockchain application for company emplyees. It allows employees to gain $TTPSC tokens and exchange collected tokens for real rewards!

Notifications You must be signed in to change notification settings

innowacja2022-dapp-TTPSC/TTPSC-Rewards-DApp

Repository files navigation

TTPSC-App

About

The main goal of this project is to create a decentralised system that will allow employees to receive tokens and exchange them for different rewards. The whole project is based on blockchain technology and makes practical use of smart contracts and cryptocurrency.

Requirements

NodeJS > 16.x
Metamask

Quick start

Setup blockchain and deploy token smart contract

To run locally:

npx hardhat node
npx hardhat run scripts/deploy.js --netowrk localhost

To run on remote network like mumbai fill your .env file with private key and network data

npx hardhat run scripts/deploy.js --netowrk mumbai

Connect to Mumbai network

To connect to remote network like Mumbai you need network RPC url and your private key. Both can be found in metamask settings. If your network is not added to metamask go to chainlist.org
Follow these steps:

  1. Create .env file in root directory
  2. Copy content .env.example and past to .env file
  3. Fill your private data

You can verify contract deployment on network scanner like : mumbai.polygonscan.com

Run frontend app

cd .\frontend\
npm i
npm run dev

Add local blockchain node to Metamask

  1. Install MetaMask
  2. Config your wallet. Write your wallet password and passphrase
  3. To add local blockchain network to metamask:
    1. Go to metamask menu Screenshot
    2. Click network manually Screenshot
    3. Fill form data. You get network name and chainID using npx hardhat run .\scripts\deployToken.js and network URL using npx hardhat node ( run commands from root project directory) Screenshot
  4. Optionally you can add token to metamask to see balance. Do it using token smart contract address.

For more hardhat tips check HardHat tutorial

Project is developed with hardhat

Example how to run some tasks using hardhat:

npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.js --netowrk localhost

Format your .sol files

npx prettier --write 'contracts/**/*.sol'

About

Decentralised blockchain application for company emplyees. It allows employees to gain $TTPSC tokens and exchange collected tokens for real rewards!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •