Green Energy Tokens, Block chain powered Renewable energy certificate system developed during the EDF CodeGreen Hackathon
This project uses the Truffle Webpack Box as a starting point. The smart contract follows the ERC 721 coin standard for Non Fungible Tokens.
The following setup guide is adapted from http://truffleframework.com/boxes/webpack and http://truffleframework.com/docs/advanced/truffle-with-metamask
- Install Truffle globally.
npm install -g truffle
- Clone repository and cd into folder.
- Install all dependencies.
npm install
- Run the development console.
- You will see 10 testing accounts and a Mnemonic needed later for Metamask.
truffle develop
- Compile and migrate the smart contract from within development console.
compile
migrate
- 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
- Get Metamask browser extension from their site metamaks.io.
- On the login page click import Existing Den
- In the box marked Wallet Seed enter the Mnemonic dipsplayed when truffle develop first run.
- Enter password and click okay.
- Click on Main Network dropdown and select Custom RPC
- In the box titles "New RPC URL enter the port specified when truffle develop command run. Likely http://127.0.0.1:9545
- On upper right account icon, select Account 1 or a different account to test contract.
To do a hard rebuild of the contract, delete the build folder in the project directory and redo steps 4-6.