Coder Social home page Coder Social logo

clearlyconstructed's Introduction

ClearlyConstructed

Smart contracts for ClearlyConstructed. We democratize public infrastructure projects by utilizing the blockchain.

Created By: Vikram Baid

Break Down of Code

Our code is split into three different contracts. The first is a simple project contract, in which you can start a project, fund it, hold money, and in case the project's funding goal doesn't get completed it will be pay back the respective members. We specifically chose to make specific objects public in order to uphold full transparency. The second contract is for Oracles, members of ClearlyConstructed that are involved with approving and changing funding. Each funded project is tied in with a group of 5 oracles, that are all chosen randomly to ensure that budgetting and work is getting done per project basis. The last contract is a simple container contract that ties in the first two contracts together so that it can be called via WEB3 using Metamask.

Asides

  1. Solidity currently does not have a great system to set up PRNG's. After doing research, we chose the best option available using solidity which was seeding using the block hash.
  2. In order to support randomness, we chose to shuffle our arrays of Oracles first, and then simply choosing the first 5 elements from there, as there are no in-built Solidity Libraries in order to randomly choose 5 elements from an array. By shuffling the array randomly using (point #1), and then selecting the first five elements we are esssentially choosing five random elements from the array.
  3. We initlialize our container with 5 existing oracles, because we have already identified 5 oracles that will work with us for our project. 5 is the minimum amount, which is why we initialize them.

clearlyconstructed's People

Contributors

imnotanoob avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.