|
1 |
| -<h1 align="center">Polychain</h1> |
| 1 | + |
2 | 2 |
|
3 |
| -<p align="center">Blockchain integration for Polyroot Infrastructure</p> |
| 3 | +> Blockchain integration for `Landate` Infrastructure |
4 | 4 |
|
5 |
| ---- |
6 |
| -## App Features |
7 |
| - |
8 |
| -### Tech Stack |
| 5 | +## Tech Stack |
9 | 6 | - `NodeJs`
|
10 | 7 | - `Solidity`
|
11 | 8 | - `Truffle` - Framework for smart contract development.
|
12 | 9 | - `Web3.Js` - Smart contract interaction
|
13 | 10 | - `Cypress` - E2E Testing
|
14 | 11 |
|
15 |
| -### 👌 Features |
| 12 | +### 👌 Contract Features |
| 13 | + |
| 14 | +The core of Polychain is a Solidity smart contract that facilitates property ownership, transfer, pricing, and shared ownership. Here's a breakdown of its features: |
| 15 | + |
| 16 | +- `Property Creation` |
| 17 | + - Owners can create properties by specifying the location and price. |
| 18 | + - Each property is represented by a unique token with an associated property ID. |
| 19 | + |
| 20 | +- `Property Transfer` |
| 21 | + - Owners can transfer property ownership to another address. |
| 22 | + - Ownership transfers are securely facilitated using the ERC721 standard. |
| 23 | + |
| 24 | +- `Property Purchase` |
| 25 | + - Users can purchase properties by sending the required funds to the contract. |
| 26 | + - The contract ensures that the purchase price matches the property's price. |
| 27 | + |
| 28 | +- `Property Price Update` |
| 29 | + - Owners can update the price of their properties. |
| 30 | + - An event is emitted to notify interested parties about the price change. |
| 31 | + |
| 32 | +- `Shared Ownership` |
| 33 | + - Owners can share ownership of a property with others. |
| 34 | + - Shared ownership is represented by assigning ownership shares to multiple addresses. |
| 35 | + - Owners can adjust the ownership shares of each participant. |
| 36 | + |
| 37 | +- `Ownership Percentage Calculation` |
| 38 | + - A function calculates the ownership percentage of a specific address for a given property. |
| 39 | + - It takes into account the ownership shares assigned to that address. |
| 40 | + |
| 41 | +- `Nomination and Transfer of Shared Ownership (Future Enhancement)` |
| 42 | + - A nomination feature can be added to facilitate the transfer of shared ownership to another address. |
| 43 | + |
| 44 | +#### Contract Deployment and Usage |
| 45 | + |
| 46 | +- To deploy the `Property` Smart Contract, compile and migrate it using the Truffle framework. |
| 47 | +- The contract provides a secure and decentralized way to manage property ownership and transactions. |
| 48 | +- Use the provided Ethereum wallet addresses and functions to interact with the contract. |
| 49 | +- The contract enforces ownership transfer rules and manages shared ownership transparently. |
16 | 50 |
|
17 |
| -- |
18 |
| -- |
19 |
| -- |
20 | 51 |
|
21 | 52 | ## Repository folder structure
|
22 | 53 | ```bash
|
|
34 | 65 | ├── test # contract testing code
|
35 | 66 | ├── truffle-config.js # truffe configuration -> https://trufflesuite.com/docs/truffle/reference/configuration/
|
36 | 67 | └── yarn.lock
|
37 |
| -``` |
| 68 | +``` |
| 69 | + |
| 70 | +## Installation |
| 71 | + |
| 72 | +- Clone the repository: |
| 73 | +```sh |
| 74 | +git clone https://github.com/your-username/polychain.git |
| 75 | + cd polychain |
| 76 | +``` |
| 77 | + |
| 78 | +### Install dependencies: |
| 79 | +```sh |
| 80 | +npm install |
| 81 | +``` |
| 82 | + |
| 83 | +### Usage |
| 84 | + |
| 85 | +Compile smart contracts and deploy on a local blockchain: |
| 86 | + |
| 87 | +```sh |
| 88 | +truffle compile |
| 89 | +truffle migrate |
| 90 | +``` |
| 91 | +- Start the server: |
| 92 | +```sh |
| 93 | +node server.js |
| 94 | +``` |
| 95 | + |
| 96 | +- Run E2E tests: |
| 97 | +```sh |
| 98 | +npm run cypress |
| 99 | +``` |
| 100 | + |
| 101 | +## Contributing |
| 102 | + |
| 103 | +Contributions are welcome! If you have any ideas or improvements, feel free to open an issue or a pull request. |
| 104 | + |
| 105 | +## License |
| 106 | +This project is licensed under the [MIT License](./LICENSE). |
0 commit comments