The TradeRES EU Blockchain Project is designed to revolutionize the energy sector by enabling secure, transparent, and efficient energy trading. Utilizing Ethereum blockchain technology, this project introduces two main smart contracts: EnergyExchange
and EnergyToken
. These contracts facilitate the production, consumption, and trading of energy tokens within a decentralized framework, promoting renewable energy usage and accessibility.
- EnergyToken Contract: Represents a digital token that mimics units of energy. The token is ERC-20 compliant, making it easily transferable and standardized across the Ethereum network.
- EnergyExchange Contract: Acts as the marketplace for energy tokens, allowing users to produce, consume, and trade energy tokens. It ensures secure transactions and maintains an accurate ledger of energy credits and debts.
To get started with the TradeRES EU Blockchain Project, follow these steps:
-
Install Node.js and npm: Ensure you have Node.js and npm installed on your system. Visit Node.js for installation instructions.
-
Install Truffle: Truffle is a development environment, testing framework, and asset pipeline for blockchains using the Ethereum Virtual Machine (EVM). Install Truffle globally using npm:
npm install -g truffle
-
Clone the Repository: Clone this repository to your local machine:
git clone https://github.com/ocatak/TradeRES-BC-Portal
-
Install Dependencies: Navigate to the cloned repository folder and install the required npm packages:
npm install
Compile the smart contracts using Truffle:
truffle compile
Deploy the contracts to an Ethereum testnet (e.g., Rinkeby) using Truffle. Ensure you have a .env
file with your Ethereum node URL and private key:
truffle migrate --network rinkeby
Interact with the contracts through the Truffle console or by integrating them into a web application using web3.js
or ethers.js
.
Example of producing energy tokens:
const energyExchange = await EnergyExchange.deployed();
energyExchange.produceEnergy(100, Date.now(), /* hour */);
Contributions to the TradeRES EU Blockchain Project are welcome! Here's how you can contribute:
- Reporting Bugs: Open an issue describing the bug and how to reproduce it.
- Suggesting Enhancements: Open an issue with your suggestions for improvements.
- Pull Requests: For substantial changes, please open an issue first to discuss what you would like to change. Ensure to update tests as appropriate.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Ethereum and the Solidity language for enabling decentralized application development.
- The TradeRES EU project team and all contributors.