Skip to content

kmitofficial/BlockchainBasedSecureMicrogrid-G95-PS23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installing Ganache :

  1. https://www.trufflesuite.com/ganache choose the version for your operating system
  2. Launch ganache
  3. Start a new Workspace
  4. save&start
  5. Connect to Ganache
  6. Install Truffle
  7. Initialize truffle project truffle init
  8. Configure Truffle to Use Ganache
  9. Migrate Contracts
  10. Deploy the contract

WhatsApp Image 2024-01-27 at 09 54 38_5151b8d9

Installing metamask:

  1. install metamask
  2. setup ganache
  3. Connect metamask to ganache
  4. Import accounts to metamask
  5. Confirm connection

WhatsApp Image 2024-01-27 at 11 29 37_80be7591

clone your project using following link:

https://github.com/kmitofficial/BlockchainBasedSecureMicrogrid-G95-PS23.git

how to run frontend

  • cd BlockchainBasedSecureMicrogrid-G95-PS23
  • cd frontend

To get npm modules for frontend part

  • npm i

To start the application

  • npm start

how to run backend

  • cd BlockchainBasedSecureMicrogrid-G95-PS23
  • cd backend

To start npm modules for backend part

  • npm i

To start backend server

  • npx nodemon server.js

To deploy the smart contract

  • cd BlockchainBasedSecureMicrogrid-G95-PS23
  • truffle deploy

WhatsApp Image 2024-01-27 at 12 42 51_f73cd080

Go to frontend/src/hooks/metamaskconnection to change contract address

WhatsApp Image 2024-01-27 at 12 48 03_b00f3d3e

Go to backend/routes/simulation.js to change the contract address

WhatsApp Image 2024-01-27 at 12 51 59_f92bdc09

About

Blockchain based Cyber-secure Microgrid implementation

Resources

License

Stars

Watchers

Forks