Our inspiration stems from the pressing issue of insufficient power supply in Africa. Energy access remains a major challenge across the continent, and this platform was conceived to address that gap. By decentralizing power supply, we aim to empower renewable energy producers and power plant operators to safely and efficiently extend energy access to those in need. Our goal is to create a more sustainable, reliable, and equitable energy system that benefits both producers and consumers, contributing to the continent's growth and development.
Check out our pitch deck here: https://drive.google.com/file/d/1DEHKmNRdKCEFtiYoxM8zxI__cjb_IBHK/view?usp=sharing
check out our live demo video here: https://www.loom.com/share/0b3fa8026eec4d1fb997e8b882f5fce5?sid=6593157c-c10a-4fb5-82f8-52ddb71f6eae
The Decentralized Energy Marketplace aims to revolutionize energy trading by creating a transparent, efficient, and user-friendly platform for energy producers and consumers. This innovative project will leverage blockchain technology to establish a single smart contract where energy producers can list their available energy credits, allowing for seamless and transparent transactions. The platform is built on the SCROLL network, leveraging its scalability and efficiency for energy transactions provided by the ALCHEMY RPC-URL
Deployed Smart contract on Scroll Sepolia Testnet: https://sepolia.scrollscan.com/address/0xA1103E6490ab174036392EbF5c798C9DaBAb24EE https://sepolia.scrollscan.com/address/0x2C0457F82B57148e8363b4589bb3294b23AE7625#code
Live Link to interact: https://energyy-chain.vercel.app/
- Facilitate peer-to-peer energy trading
- Promote sustainable energy usage
- Create a user-friendly interface for energy transactions
- Ensure secure and transparent energy trading using blockchain technology
- Build a community-driven marketplace for renewable energy
Key Features:
-
Decentralized Energy Trading: The platform facilitates a decentralized marketplace where energy producers can easily showcase their available energy credits, enabling direct trading with consumers.
-
On-Chain Tracking: All transactions related to energy trades and transfers are recorded on-chain, ensuring transparency and traceability of energy credits. This feature enhances trust among participants and simplifies regulatory compliance.
-
Micro-Transactions Support: By utilizing Scroll’s low transaction fees, the marketplace will support micro-transactions, making it feasible for consumers to purchase small amounts of energy credits without incurring prohibitive costs.
-
Tokenization of Energy Credits: Upon purchasing energy credits, buyers receive transferable tokens that represent their credits. These tokens are securely stored in their wallets, enabling easy transfers and trades within the marketplace.
-
Usage and Balance Tracking: The platform will provide users with intuitive tools to monitor their available energy credits and usage in real-time, promoting informed decision-making and efficient energy management.
- User-friendly dashboard for energy trading
- Real-time energy listings
- Secure blockchain-based transactions
- Community-driven marketplace
- Integration with Rainbow Kit for easy wallet connection
- Frontend: Next.js, Typescript, Wagmi, Ethers.js
- Styling: Tailwind CSS
- Smart Contracts: Solidity
- Development Environment: Hardhat
- Blockchain Network: Scroll (Testnet)
- RPC Provider: Alchemy
- Deployment: Hardhat Ignition
The project is divided into two main directories:
frontend
: Contains the frontend React applicationsmart-contracts
: Contains the smart contract and related files
.
├── frontend/
│ ├── src/
│ │ ├── app/
│ │ ├── components/
│ │ ├── lib/
│ │ └── ...
│ ├── package.json
│ └── tailwind.config.ts
├── smart-contracts/
│ ├── contracts/
│ │ └── Energy.sol
│ │ └── ICAR.sol
│ ├── hardhat.config.ts
│ └── package.json
└── README.md
The project uses a custom ERC20 token called ICAR (Icar Token) for energy trading. The smart contract is located in smart-contracts/contracts/ICAR.sol
.
- Node.js (v14 or later)
- npm or yarn
- Git
git clone https://github.com/codequest07/Icarus.git
cd Icarus
npm install
-
Navigate to the
frontend
directory:cd frontend
-
Install dependencies:
npm install
-
Create a
.env.local
file in thefrontend
directory with the following content:NEXT_PUBLIC_ALCHEMY_ID=<Your Alchemy API Key>
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser to see the application.
-
Navigate to the
smart-contracts
directory:cd smart-contracts
-
Install dependencies:
npm install
-
Create a
.env
file in thesmart-contracts
directory with the following content:SCROLL_RPC_URL=<Your Alchemy Scroll Testnet RPC URL> ACCOUNT_PRIVATE_KEY=<Your Ethereum account private key>
-
Compile the smart contracts:
npx hardhat compile
The smart contracts are deployed to the Scroll Testnet using Alchemy's RPC URLs and API. Make sure to update the hardhat.config.ts
file with the correct network configurations before deployment.
Create a .env
file in the smart-contracts
directory with the following variables:
ALCHEMY_SCROLL_RPC_URL=your_alchemy_scroll_rpc_url
ACCOUNT_PRIVATE_KEY=your_wallet_private_key
SCROLLSCAN_API_KEY=your_scrollscan_api_key
- To get your Alchemy scroll rpc url you have to sign up on Alchemy and head to your dashboard https://dashboard.alchemy.com/ to get your alchemy scroll rpc url
- To get your ScrollScan Api key you also have to sign up on scrollscan and then head to your dashboard to get your api key https://scrollscan.com/myapikey
To deploy the smart contracts to Scroll Sepolia:
cd hardhat-contracts
npx hardhat ignition deploy ignition/modules/Energy.ts --network scroll_sepolia
To verify the contract on ScrollScan:
npx hardhat verify YOUR_CONTRACT_ADDRESS --network scroll_sepolia
Replace YOUR_CONTRACT_ADDRESS
with the address of your deployed contract.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.