Skip to content

using blochain to secure the data sharing among internett of vehicles

License

Notifications You must be signed in to change notification settings

milindsoorya/blockchain-based-iov

Repository files navigation

eth-messaging

This project is inspired from https://github.com/lfrKain/eth-messaging

Tech stack

How to test

Step 1:

Run npm install.

Step 2:

Run a local swarm node with docker docker run -p 8500:8500 -e PASSWORD=password123 -t ethdevops/swarm --httpaddr 0.0.0.0.

Step 3:

Execute npm run dev. This will start ganache-cli, deploy smart contract wih truffle and deploy and run the application with lite-server on port 3000.

Ganache-cli is started with 4 predefined ethereum private keys you can use to test the dapp:

  • Alice -> 9b3b72cc4b29b4e7d0c39962ca3a7db11e1e60a1353e39705d82b36012694caf
  • Bob -> eeb80a1e35c9db4dabd237edb5fd2827312ac2ce32723f163d067169c870eff1
  • Frank -> b5a3091a455b493dab6f53825b92301f2f77ea9bbe2ff4bb5e65486e97126b39
  • e5a90dceea42ad2ec7360f08185089ba6187f3422d974872cff5219801f8c84b for sending anonymous messages.

For testing how messages are sent from one account to another, you should import at least 2 of these accounts into Metamask in differenct browser instances. In Chrome, each instance should have a different profile. For opening Chrome with a different profile than default in linux, execute google-chrome --profile-directory=Temp. Also CORS should be enabled to be able to interact with swarm, i suggest to use this chrome plugin.

Additional commands

Execute contract tests:

npm run truffle test

Execute contract tests with coverage:

./node_modules/.bin/solidity-coverage

Execute Solium:

npm run solium

About

using blochain to secure the data sharing among internett of vehicles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages