This project consists of Solidity smart contracts designed for a user registry and marketplace system, where users can register, manage houses, deposit power units, and buy coupons. The marketplace allows users to sell power units. This README provides an overview of the smart contracts, their functionalities, and usage instructions.
The UserRegistery
contract allows users to register, manage houses, deposit power units, and buy coupons. The key functionalities include:
- User Registration: Users can register themselves.
- House Management: Users can register houses and deposit power units.
- Coupons: Users can buy coupons using their loyalty points.
The Marketplace
contract allows users to place bids for selling power units. It interacts with the UserRegistery
contract to verify user and house information.
To deploy the contracts, follow these steps:
-
Install Solidity and a suitable development environment such as Remix.
-
Compile the
UserRegistery
andMarketplace
contracts. -
Deploy the
UserRegistery
contract first and note down its address. -
Deploy the
Marketplace
contract, passing the address of the deployedUserRegistery
contract to its constructor.
function registerUser() public;
function DepositUnits(address houseAdd,uint num_Of_Units) public;
function withdrawalUnits(string calldata houseAddr, uint256 noOfUnits) public;
function buyCoupons(CouponsEnum couponName) public;
function addBid(uint256 numOfUnits, uint256 pricePerUnit) public returns (bool);
Places a bid for selling power units.
function startOrder() public returns (bool);