Skip to content

Blockchain based IPL teams voting app. Frontend using ReactJS .Ethereum at backend as a public blockchain .

Notifications You must be signed in to change notification settings

Yash-Bhange/Meta2k20

Repository files navigation

steps to run the code on local machine with Ganache !

  1. pull the code in specific folder(ex:Election)
  2. run npm install to install dependencies(if error try command with administrator privilage or use 'sudo')
      2-a) run npm install react-scripts@2.1.8 --save
      2-b) add node modules folder to .gitignore file
  3. open local blockchian i.e ganache (will provide u 10 accounts )
  4. run command "truffle compile" in Election folder
  5. run command "truffle migrate --reset" in same folder
  6. run npm start (start development server)
  7. web page will show metamask popup
  8. click on import account through seed phrase
  9. paste 12 words seed phrase from ganache to metamask
  10. set password
  11. you are all set to go !

Note : You need to run step 4,5,8,9 every time you restart of open new instance of Ganache

steps to run the code on on Ropsten test network!

  1. pull the code in specific folder(ex:Election)
  2. run npm install to install dependencies (if error try command with administrator privilage or use 'sudo')
      2-a) run npm install react-scripts@2.1.8 --save
  3. run command truffle compile in Election folder
  4. customizing Metamask and Infura>
      4-a) Register on Infura.io website, create project & copy project ID.
      4-b) Download metamask extension for browser ,Register on it.set password and save the 12 word phrase somewhere.
      4-c) Create s secret.json file whose structure is - {
         "mnemonic": "12 word phrase",
         "projectId": "e98bfc46....."
         }
  5. add secret.json file & node modules folder to .gitignore file
  6. run command "truffle migrate --reset --network ropsten" in same folder (it will take some time)
  7. run npm start (start development server)
  8. web page will show metamask popup , enter the password which you have set at the start
    ,
  9. you are all set to go !

Note : step 3,5,6 & all section of 4 are on time step. Do not repeat every time you start the website


Firebase deployment steps are not explained here!

Sample Work :