Welcome to the Decentralized Architectural Competition project, a smart contract that integrates the robustness of blockchain technology to administer an architectural design competition.
The smart contract permits the handling of competition entries, voting, and the announcement of the victor. This underscores how conventional architectural competitions can be reformed by incorporating blockchain technology, thereby resulting in a system that offers unalterable, secure, and decentralized processes for both the administrators and contestants.
In this construct, participants interact with the smart contract to submit their architectural design, which also necessitates an entry fee payment, thereby establishing their effective registration in the contest. The blockchain stores all entries, thus assuring their immutable nature and transparency.
Voting is conducted via the smart contract as well, facilitating a transparent vote count for each submission. The system has been devised in such a manner that each participant is permitted a single vote, and voting is restricted after a predetermined deadline.
It further includes an automated reward distribution system. Upon reaching the voting deadline and after the vote count, the prize money, which is an accumulation of the entry fees, is automatically transferred to the winner's account. This mechanism ensures an immediate reward distribution system.
This project serves as a testament to how blockchain technology can be employed to transform multiple sectors, including architectural design. The fairness, transparency, and security of the system make it an intriguing development in the realm of architectural competitions. Such decentralized systems can foster global participation and unbiased outcomes.
- Immutable Entries: Each participant submits their design via the smart contract. The entries, stored on the blockchain, ensure immutability and transparency.
- Transparent Voting: Voting happens through the smart contract. Each participant gets one vote and cannot vote post the pre-specified deadline.
- Automatic Prize Distribution: Once the voting ends, the prize money, accumulated from the entry fees, is auto-transferred to the winner's account, ensuring swift and fair reward distribution.
- Install Node.js
- Install Ethereum's development framework, Truffle
- Clone the repository:
git clone https://github.com/yourGitHubUsername/DecentralizedArchitecturalCompetition.git
- Change into the project directory:
cd DecentralizedArchitecturalCompetition
- Install dependencies:
npm install
- Compile the smart contract:
truffle compile
- Deploy the smart contract:
truffle migrate --network yourPreferredNetwork
Install
npm i
Compile
npm run compile
The contract is deployed by the organizer of the competition. The constructor sets the organizer and entry fee. A competitor can submit their entry using the submitEntry function. They have to send an amount equal to or greater than the entry fee. The organizer can select the winner using the selectWinner function. They can only do this before a winner has been declared and they have to provide a valid entry index. When the winner is selected, all the entry fees collected are transferred to the winner. This is a basic contract. If you need a more complex or specific functionality, please provide additional details.
The smart contract includes functionality for:
- A voting mechanism where participants can vote on entries.
- Restricting one vote per address.
- Automatic distribution of prize money.
- We'll also improve on a few security aspects. Let's continue using Solidity language for this:
In this contract:
- A
voteCount
field toEntry
, ahasVoted
mapping to keep track of who has voted, and avotingDeadline
to determine when voting ends. - A
vote
function that allows people to vote on entries. Each address can only vote once, and voting can only occur before the deadline. - A
declareWinner
function now declares the winner based on who has the most votes after the voting deadline has passed. - We emit an event when the winner is declared.
- We also added two modifiers to check if the current time is before or after the voting deadline.
- The winner is declared based on voting, rather than being chosen by the organizer.
- All entry fees collected are transferred to the winner after they have been declared.
Please note that this is still a basic example and real-world contracts would likely need additional functionality, such as more complex voting mechanisms, additional security measures, handling of ties, and more. This code has not been audited and is not recommended for use in production without further modifications and testing.
Solidity |
Teal |
|
---|---|---|
Template | >>> | >>> |
Architectural Design | >>> | >>> |
Architecture Competition | >>> | >>> |
Housing Cooporative | >>> | >>> |
Land Registry | >>> | >>> |
Real-Estate Crowdfunding | >>> | >>> |
Rent-to-Own | >>> | >>> |
Self-Owning Building | >>> | >>> |
Smart Home | >>> | >>> |
This is an open-source project by the Block Foundation.
The 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.
website: www.blockfoundation.io
We'd love for you to contribute and to make this project even better than it is today! Please refer to the contribution guidelines for information.
Copyright © 2023 Stichting Block Foundation. All Rights Reserved.
Except as otherwise noted, the content in this repository is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License, and code samples are licensed under the Apache 2.0 License.
Also see LICENSE and LICENSE-CODE.
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.