.
├── app # Showcase DApp front-end (React)
├── contract # Smart contract to deploy to the Energy Web Testnet - Volta (Truffle)
├── docs # Documentation files and report of the project (LateX)
├── node # Configuration for a client node on the Energy Web Testnet - Volta (openehtereum)
├── .gitattribute # .gitattribute file
├── .gitignore # .gitignore file
├── LICENSE # Licence of the project
└── README.md # This file
Sample DApp meant to showcase the Energy Web's chain capabilities.
- node 16.2.0
- OPTIONAL MetaMask
- In the app directory, first run
npm install
npx patch-package
- If any change is made on the abis stored in the src/asset/json folder, you may want to run
npm run typechain
to update the type files. WARNING: doing so may remove some facilities I added manually - If you want to test the app for yourself you will need the MetaMask browser extension connected to the Volta test-net. Make sure to have some Volta token available.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point, you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However, we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
- node 16.2.0
- OPTIONAL ganache
- OPTIONAL MetaMask
- In the app directory, first run
npm install
- Make sure to edit the truffle-config.js file to best fit your needs.
- If you plan on using ganache, edit the networks/development configuration to point to your ganache server
- You can also use another network, but you may need to create a .secret file containing the passphrase of your wallet and use the MetaMask provider
- It is possible to connect using an Infura node
- Check here for more information about the truffle-config.js configuration
- With any command you can change the network you are using by providing the
--network <network_name>
flag
Compiles all contracts and stores their json representation in the build folder.
Runs the migration scripts in the migrations folder, with the purpose of deploying the contracts on the blockchain.
Launches the test runner that executes all the tests in the test folder.
They are tailored to test the Marketplace contract.
Opens an interactive console that also spawns a development blockchain
Opens an interactive console that connects to the provided network (the first if not specified)
Contracts currently deployed on the Volta blockchain 📜
- Energy Web's Identity Manager
- Marketplace