Skip to content

Kcheung42/BlockChain-REC

Repository files navigation

BlockChain-REC

Green Energy Tokens, Block chain powered Renewable energy certificate system developed during the EDF CodeGreen Hackathon

Technology

This project uses the Truffle Webpack Box as a starting point. The smart contract follows the ERC 721 coin standard for Non Fungible Tokens.

Set Up

The following setup guide is adapted from http://truffleframework.com/boxes/webpack and http://truffleframework.com/docs/advanced/truffle-with-metamask

  1. Install Truffle globally.
 npm install -g truffle
  1. Clone repository and cd into folder.
  2. Install all dependencies.
npm install
  1. Run the development console.
  • You will see 10 testing accounts and a Mnemonic needed later for Metamask.
truffle develop
  1. Compile and migrate the smart contract from within development console.
compile
migrate
  1. run the webpack server for front-end reloading.
  • This will not recompile changes to the contract.
npm run dev 
  • View project in browser at location specified

Step 2 - Install Metamask

  1. Get Metamask browser extension from their site metamaks.io.
  2. On the login page click import Existing Den
  3. In the box marked Wallet Seed enter the Mnemonic dipsplayed when truffle develop first run.
  4. Enter password and click okay.
  5. Click on Main Network dropdown and select Custom RPC
  6. In the box titles "New RPC URL enter the port specified when truffle develop command run. Likely http://127.0.0.1:9545
  7. On upper right account icon, select Account 1 or a different account to test contract.

Troubleshooting

To do a hard rebuild of the contract, delete the build folder in the project directory and redo steps 4-6.

About

EDF Hackathon, Block chain powered Renewable energy certificate system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published