{"id":39709113,"url":"https://github.com/block-foundation/solidity-community-land-trust","last_synced_at":"2026-01-18T10:36:45.309Z","repository":{"id":184728322,"uuid":"670538448","full_name":"block-foundation/solidity-community-land-trust","owner":"block-foundation","description":"Solidity Smart Contract: Community Land Trust (CLT)","archived":false,"fork":false,"pushed_at":"2024-10-28T08:39:00.000Z","size":81,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-04T22:33:23.114Z","etag":null,"topics":["block-foundation","blockchain","blockfoundation","clt","community","community-land-trust","eth","ethereum","real-estate","real-estate-management","sol","solidity"],"latest_commit_sha":null,"homepage":"https://www.blockfoundation.io","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/block-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":".github/GOVERNANCE.md","roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"block-foundation","open_collective":"block"}},"created_at":"2023-07-25T09:21:37.000Z","updated_at":"2024-08-14T12:17:24.000Z","dependencies_parsed_at":"2023-07-29T23:32:41.585Z","dependency_job_id":"441bc5d9-328f-4295-9755-0487827eec1f","html_url":"https://github.com/block-foundation/solidity-community-land-trust","commit_stats":{"total_commits":89,"total_committers":1,"mean_commits":89.0,"dds":0.0,"last_synced_commit":"dd976a5f365157e75015a3713c251a3b02dae3a8"},"previous_names":["block-foundation/solidity-community-land-trust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/block-foundation/solidity-community-land-trust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-community-land-trust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-community-land-trust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-community-land-trust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-community-land-trust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-foundation","download_url":"https://codeload.github.com/block-foundation/solidity-community-land-trust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-foundation%2Fsolidity-community-land-trust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["block-foundation","blockchain","blockfoundation","clt","community","community-land-trust","eth","ethereum","real-estate","real-estate-management","sol","solidity"],"created_at":"2026-01-18T10:36:45.206Z","updated_at":"2026-01-18T10:36:45.277Z","avatar_url":"https://github.com/block-foundation.png","language":"Solidity","funding_links":["https://github.com/sponsors/block-foundation","https://opencollective.com/block"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"right\"\u003e\n\n[![GitHub License](https://img.shields.io/github/license/block-foundation/blocktxt?style=flat-square\u0026logo=readthedocs\u0026logoColor=FFFFFF\u0026label=\u0026labelColor=%23041B26\u0026color=%23041B26\u0026link=LICENSE)](https://github.com/block-foundation/solidity-community-land-trust/blob/main/LICENSE)\n[![devContainer](https://img.shields.io/badge/Container-Remote?style=flat-square\u0026logo=visualstudiocode\u0026logoColor=%23FFFFFF\u0026label=Remote\u0026labelColor=%23041B26\u0026color=%23041B26)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/block-foundation/solidity-community-land-trust)\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv\u003e\n    \u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/block-foundation/brand/master/src/logo/logo_gray.png\" width=\"96\" alt=\"Block Foundation Logo\"\u003e\n    \u003ch1 align=\"left\"\u003eCommunity Land Trust\u003c/h1\u003e\n    \u003ch3 align=\"left\"\u003eBlock Foundation Smart Contract Series [Solidity]\u003c/h3\u003e\n\u003c/div\u003e\n---\n\n\u003cimg align=\"right\" width=\"75%\" src=\"https://raw.githubusercontent.com/block-foundation/brand/master/src/image/repository_cover/block_foundation-structure-03-accent.jpg\"  alt=\"Block Foundation Brand\"\u003e\n\n### Contents\n\n1. [Introduction](#introduction)\n2. [Features](#features)\n3. [Quick start](#quick-start)\n4. [Setup and Installation](#setup-and-installation)\n5. [Usage](#usage)\n6. [Contribution](#contribution)\n7. [License](#license)\n7. [Colophon](#colophon)\n\n\u003cbr clear=\"both\"/\u003e\n\n---\n\n\u003cdiv align=\"right\"\u003e\n\n[![Report a Bug](https://img.shields.io/badge/Report%20a%20Bug-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-community-land-trust/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=bug_report.yml)\n[![Request a Feature](https://img.shields.io/badge/Request%20a%20Feature-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-community-land-trust/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=feature_request.yml)\n[![Ask a Question](https://img.shields.io/badge/Ask%20a%20Question-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-community-land-trust/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=question.yml)\n[![Make a Suggestion](https://img.shields.io/badge/Make%20a%20Suggestion-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-community-land-trust/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=suggestion.yml)\n[![Start a Discussion](https://img.shields.io/badge/Start%20a%20Discussion-GitHub?style=flat-square\u0026\u0026logoColor=%23FFFFFF\u0026color=%23E1E4E5)](https://github.com/block-foundation/solidity-community-land-trust/issues/new?assignees=\u0026labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected\u0026projects=\u0026template=discussion.yml)\n\n\u003c/div\u003e\n\n**The `CommunityLandTrust` smart contract facilitates the management and operations of land parcels within a decentralized land trust community. It allows users to buy and sell land parcels, transfer ownership, and provides an administrative interface for trustees and the contract owner.**\n\n## Introduction\n\nIn this community land trust smart contract, we explore a sophisticated example of land management on the Ethereum blockchain. The CLT contract encapsulates multiple unique aspects of a trust, including land as unique parcels rather than indistinguishable units, trustees who have special privileges, dynamic pricing, and operations like land purchase, sale, and transfer among users.\n\nThe Community Land Trust contract models the sale and purchase of land as transactions on the Ethereum blockchain. Instead of treating land as indistinguishable units, the contract recognizes each land parcel as a unique entity, with an ID and an owner. This allows for more realistic representation and tracking of land ownership.\n\nThe contract recognizes the role of trustees in a land trust. Trustees have the power to change the price of land parcels. The owner of the contract, usually the trust, has the power to add or remove trustees. All these operations trigger events that provide transparency and traceability.\n\nUsers can buy available land parcels from the trust. When a land parcel is purchased, it is assigned to the buyer and can no longer be bought by others. Owners of land parcels have the flexibility to sell the parcels back to the trust or transfer ownership to other users. This allows for dynamic changes in the distribution of land ownership within the community land trust.\n\nWhile this contract offers a robust and realistic representation of a community land trust, it serves as a starting point and should be customized according to the specific needs of the trust. As with any blockchain contract, it is critical to thoroughly test and audit the contract code before deploying it on the mainnet.\n\nIn summary, the Community Land Trust contract provides a sophisticated example of using Ethereum for managing real-world assets and transactions, demonstrating the immense potential of blockchain technology in revolutionizing how we handle and exchange value.\n\n## Features\n\n- **Purchase Land**: Users can purchase available land parcels by sending the specified Ether amount.\n- **Sell Land**: Landowners can sell their parcels back to the trust.\n- **Transfer Ownership**: Landowners can transfer their land parcels to another Ethereum address.\n- **Admin Functions**: The contract owner and trustees have special permissions:\n  - Set the price of land parcels.\n  - Add or remove trustees.\n  - Withdraw contract balance.\n\n### Functions\n\nThis contract includes:\n\n- `LandParcel`: A struct that represents a unique land parcel with an ID and owner.\n- `landParcels`: A mapping from a land parcel ID to the LandParcel struct.\n- `landOwners`: A mapping from an address to an array of land parcel IDs owned by that address.\n- `purchaseLand`: A function for buying land parcels from the trust.\n- `sellLand`: A function for selling land parcels back to the trust.\n- `transferLand`: A function for transferring ownership of a land parcel to another user.\n- `getLandParcels`: A function that returns all land parcel IDs owned by a user.\n\n## Quick Start\n\n\u003e Install\n\n``` sh\nnpm i\n```\n\n\u003e Compile\n\n``` sh\nnpm run compile\n```\n\n## Setup and Installation\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/)\n- [Truffle Framework](https://www.trufflesuite.com/)\n- [MetaMask](https://metamask.io/) or similar Ethereum web3 provider\n\n### Steps\n\n1. Clone this repository:\n\n   ```bash\n   git clone [Repository Link]\n   ```\n\n2. Change into the directory:\n\n   ```bash\n   cd CommunityLandTrustContract\n   ```\n\n3. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n4. Compile the contract:\n\n   ```bash\n   truffle compile\n   ```\n\n5. Deploy the contract to a local Ethereum network using Truffle:\n\n   ```bash\n   truffle migrate --reset\n   ```\n\nOf course! Here's an expanded \"Usage\" section for the `README.md` detailing more function calls:\n\n---\n\n## Usage\n\n1. **Buying Land**:\n\n   ``` javascript\n   contractInstance.purchaseLand({value: etherAmount});\n   ```\n\n2. **Selling Land**:\n\n   ``` javascript\n   contractInstance.sellLand(parcelId);\n   ```\n\n3. **Transferring Land**:\n\n   ``` javascript\n   contractInstance.transferLand(parcelId, recipientAddress);\n   ```\n\n4. **Setting Land Price (Trustees only)**:\n\n   ``` javascript\n   contractInstance.setLandPrice(newPrice);\n   ```\n\n5. **Fetching Land Parcels Owned by an Address**:\n\n   ``` javascript\n   let parcelsOwned = await contractInstance.getLandParcels(ownerAddress);\n   console.log(\"Land Parcels:\", parcelsOwned);\n   ```\n\n6. **Adding a Trustee (Owner only)**:\n\n   ``` javascript\n   contractInstance.addTrustee(newTrusteeAddress);\n   ```\n\n7. **Removing a Trustee (Owner only)**:\n\n   ``` javascript\n   contractInstance.removeTrustee(trusteeAddress);\n   ```\n\n8. **Withdrawing Contract Balance (Owner only)**:\n\n   ``` javascript\n   contractInstance.withdraw();\n   ```\n\n9. **Fetching Land Details by Parcel ID**:\n\n   ``` javascript\n   let landParcel = await contractInstance.landParcels(parcelId);\n   console.log(\"Land Owner:\", landParcel.owner);\n   ```\n\n10. **Checking Trustee Status**:\n\n   ``` javascript\n   let isTrustee = await contractInstance.trustees(addressToCheck);\n   console.log(\"Is Trustee:\", isTrustee);\n   ```\n\n---\n\n## Colophon\n\n### Authors\n\nThis is an open-source project by the **[Block Foundation](https://www.blockfoundation.io \"Block Foundation website\")**.\n\nThe Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology. Therefore the Block Foundation seeks to unschackle the traditional constraints and construct middle ground between rent and the rigidity of traditional mortgages.\n\nwebsite: [www.blockfoundation.io](https://www.blockfoundation.io \"Block Foundation website\")\n\n### Development Resources\n\n### Other Repositories\n\n#### Block Foundation Smart Contract Series\n\n|                                   | `Solidity`  | `Teal`      |\n| --------------------------------- | ----------- | ----------- |\n| **Template**                      | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-template) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-template) |\n| **Architectural Design**          | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-architectural-design) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-architectural-design) |\n| **Architecture Competition**      | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-architecture-competition) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-architecture-competition) |\n| **Housing Cooporative**           | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-housing-cooperative) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-housing-cooperative) |\n| **Land Registry**                 | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-land-registry) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-land-registry) |\n| **Real-Estate Crowdfunding**      | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-real-estate-crowdfunding) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-real-estate-crowdfunding) |\n| **Rent-to-Own**                   | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-rent-to-own) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-rent-to-own) |\n| **Self-Owning Building**          | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-self-owning-building) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-self-owning-building) |\n| **Smart Home**                    | [**\u003e\u003e\u003e**](https://github.com/block-foundation/solidity-smart-home) | [**\u003e\u003e\u003e**](https://github.com/block-foundation/teal-smart-home) |\n\n#### Contributing\n\nWe'd love for you to contribute and to make this project even better than it is today!\nPlease refer to the [contribution guidelines](.github/CONTRIBUTING.md) for information.\n\n### Legal Information\n\n#### Copyright\n\nCopyright \u0026copy; 2023 [Stichting Block Foundation](https://www.blockfoundation.io/ \"Block Foundation website\"). All Rights Reserved.\n\n#### License\n\nExcept as otherwise noted, the content in this repository is licensed under the\n[Creative Commons Attribution 4.0 International (CC BY 4.0) License](https://creativecommons.org/licenses/by/4.0/), and\ncode samples are licensed under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\n\nAlso see [LICENSE](https://github.com/block-foundation/community/blob/master/src/LICENSE) and [LICENSE-CODE](https://github.com/block-foundation/community/blob/master/src/LICENSE-CODE).\n\n#### Disclaimer\n\n**THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-foundation%2Fsolidity-community-land-trust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-foundation%2Fsolidity-community-land-trust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-foundation%2Fsolidity-community-land-trust/lists"}