GithubHelp home page GithubHelp logo

citydaoproject / app Goto Github PK

View Code? Open in Web Editor NEW
33.0 7.0 20.0 212.73 MB

A web app to view CityDAO land parcels

Home Page: app-citydao.vercel.app

License: MIT License

JavaScript 39.14% Solidity 10.94% HTML 2.93% CSS 0.05% TypeScript 34.21% Less 5.92% Dockerfile 1.45% Shell 5.37%
webapp web3 web3-dapp dapp decentralized-application city land parcels ethereum ethereum-dapp nft nfts dao webapplication decentralized

app's Introduction

CityDAO

Getting started

1. Install dependencies

yarn

2. Start local Ethereum chain

Note: start this in a separate terminal window. This process needs to run continuously

yarn chain

3. Deploy contract and create plots

Before deploying the contract, make sure that env variables point the script to deploy on localhost.

export REACT_APP_NETWORK="localhost"

Deploy the contract to the local blockchain

yarn deploy

Next, we will create the actual plots. the following command will create up to 1000 plots. For development purposes, it's recommended that you exit out of the process (ctrl+c) after 10 or so plots. You won't need all 1000 plots for local development

yarn create-plots

4. Run the web app

First, create a new .env file in the packages/react-app directory by copying example.env (Reach out to Dev Guild facilitators for the related API keys)

Then start the web app locally on http://localhost:3000

yarn start

5. Make Metamask point at the hardhat chain

Metamask points to localhost:8545's 1337 chain ID as default. This needs to be changed to the chain ID hard hat uses, 31337. Update the chain ID at: Metamask > Settings > Networks > Localhost > Chain ID

app's People

Contributors

aunyks avatar davidfant avatar gregfromstl avatar lonisss avatar odyslam avatar scottfits avatar ssdsr avatar trkaplan avatar valtterikodisto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

app's Issues

Feature: Add payment to smart contract

Currently, the MVP smart contract only involves paying the gas fees to mint the parcel. There is a "price" parameter stored with the parcel, it just isn't being used.

AC:
[ ] The listed price is paid to CityDAO on parcel purchase/mint

Limit number of PlotButtons shown at once

Need to reduce the number of plot buttons shown at any given time for the sake of performance.

Acceptance Criteria

  • On initial render, only 25 plot buttons are shown
  • The user can click "Show more" text at the bottom of the 25 to show another 25
  • On search, only the 25 best matches are shown
  • On search or detail opening, the default reverts back to 25 (undoes "show more")

Gas Optimizations

This is a card for any and all gas optimizations made to the contract. Please reference this issue in your PR(s).

Bounty

10 Credits / $100 saved in gas

Warn user when on the wrong network

Currently, the network the app uses is based on whichever network is selected in MetaMask, which causes issues when that network is not the same as the network the contract is deployed to. There is a target network env variable that matches the intended network. When the injected provider network does not match this network, the user should be notified and the site should be disabled.

Feature: Buy Now button

Acceptance Criteria:

  • button is disabled with tooltip if not connected to wallet
  • button changes to "View on OpenSea" if parcel is sold

./ProgressBar not found in components

Issue

The react component file ProgressBar is not in the ~/src/components list

./src/components/index.ts
Module not found: Can't resolve './ProgressBar' in '/media/slyracoon23/Extreme SSD/Ubuntu-files/Documents/CityDao/parcel-viewer/app/packages/react-app/src/components'

Looking at the git-blame it looks like @gregfromstl committed the code 9 months ago

Solution

Add the component

Tag

@gregfromstl @trkaplan

Transparency Contract & Dashboard

This project was initiated through CIP-13. The objective is to provide citizens of CityDAO transparency into the DAO's financial status and behaviors on a consistent basis. It will involve both on-chain registration of the DAO's wallets for accountability, and a frontend dashboard providing accessibility to this information.

Add images to NFTs

Currently, we are just using placeholder images. Need to include parcel images in the metadata and load them in a performant way.

Bounty

15 Credits

Feature: Parcel detail drawer

Acceptance Criteria:

  • When a user clicks a parcel in the map or the parcel list, the parcel detail drawer is opened (replaces parcel list)
  • User clicks back button to return to parcel list
  • Parcel is highlighted in map while detail drawer is open
  • Parcel detail drawer shows: Price, image, buy button, metadata/details, and land rights

Fix plot list scrolling

As a user, I need to be able to scroll through the plot list to find some nice land to buy.

Acceptance Criteria

  • The plot list is scrollable, but no scroll bar is shown (clashes with our styles)
  • The overall body of the application is fixed to 100% of the screen's height
  • Clicking on a parcel detail maintains this 100% height

Citybot

Develop a bot that will integrate Discourse proposals with Discord reactions to determine which CIPs have gained sufficient momentum to reach a Snapshot vote.

Feature: Parcel List

Acceptance Criteria:
As a user, I can...

  • Toggle between Remaining/Sold/All parcels
  • Mouse over a parcel on the map and see the hovered parcel's listing highlighted
  • Mouse over a parcel listing and see the in-map parcel highlighted

Contracts are not deploying locally

I'm following the local deployment instructions in the README. The contract compiles but I get the following error when I try to deploy locally.

Compilation finished successfully
deploying "CityDaoParcel"insufficient funds for intrinsic transaction cost (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.3.1) {"reason":"insufficient funds for intrinsic transaction cost","code":"INSUFFICIENT_FUNDS","error":{"name":"ProviderError","code":-32000,"_isProviderError":true},"method":"sendTransaction"} Error: insufficient funds for intrinsic transaction cost (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.3.1

What I've tried

I'm surprised by this error because, with my limited experience with Hardhat/Truffle, local deployment workflows generally will create an address with funds for you and then try to deploy the contract on that address. I haven't seen this error for local deployment before.

I haven't found anything online about this occurring during local deployment, only during deployment to a testnet. I've confirmed that REACT_APP_NETWORK is set to localhost. I'm not totally sure what the yarn chain command is doing so I suspect the README is just missing some context.

Constitution Contract

Put the DAO's constitution on the Ethereum blockchain such that it is immutable, amendable, and publicly readable.

Revoking Land

  • Is there a workflow or can we do this instantaneously (need consider though if there's an 'eviction process' or similar to consider)
  • Is there a workflow or can we do this instantaneously (need consider though if there's an 'eviction process' or similar to consider)

Verify citizen NFT type before purchase

Acceptance Criteria

  • contract checks to see what type of citizen NFT is owned (if any)
  • contract purchasing permissions (tiers of citizen NFT) can be set by owner

Bounty

100 credits

Create backend for storing metadata

Need to store parcel metadata on the backend, and update every 48 hours.

Acceptance Criteria

  • Every 24 hours, a cloud function runs to pull all parcels' metadata from IPFS with a 5 second delay between calls
  • The cloud function pulls geojson and calculates acreage and primary lat, long -- storing all three
  • The frontend pulls from the DB to update parcel metadata, rather than IPFS

Docs: Update README

Acceptance Criteria:

  • README includes project overview and structure
  • Add license to the repo

Create script for segmenting plots

Acceptance Criteria

  • I can generate equally sized plots based on a parcel bounding box
  • I can exempt a center part of this parcel from the plot creation

Implement Unit Tests for Contracts

A rigorous suite of unit tests for the contracts will give us a good level of confidence that the contracts behave as intended.

Bounty

50 Credits

Notification component

Create a component for displaying errors and transaction notifications to the user (will have to override the tx notifications currently shown).

Reduce number of calls to smart contract

Need to conserve number of IPFS calls.

Acceptance Criteria

  • Only one contract call is needed to retrieve price, sold status, and owner for all parcels
  • Frontend only makes one IPFS call to retrieve above data
  • Only one contract call and one IPFS call is needed to retrieve metadata for all parcels

Research Lease Renewal Concept

How does ENS do the renewal / recurring revenue model in their contracts โ€” we could do this? (think 1yr lease and pay to renew longer)

Find and report bugs

Finding and reporting critical bugs might result in retroactive airdrops at some point in the future.

Smart Contracts - Schedule Audit

  • Scout some auditors and get booked (if we feel we need)
  • OR get dev from our our community to act as 3rd party (who didn't develop and has audit experience)

Fix tx notifications styling

Parts of the div have a white background. Hard to catch CSS classes as the notifications go away after a few seconds.

Smart Contracts: Royalty

  • transfer logic to pay CityDAO a royalty on each sale. Could be hardcoded at 5% to start and ideally changed via a call to the smart contract from the CityDAO Gnosis

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.