Code Monkey home page Code Monkey logo

crowdfundr's Introduction

Crowdfundr

This repository contains a sample project that you can use as the starting point for your Ethereum project. It's also a great fit for learning the basics of smart contract development.

This project is intended to be used with the Hardhat Beginners Tutorial, but you should be able to follow it by yourself by reading the README and exploring its contracts, tests, scripts and frontend directories.

Specification

- The smart contract is reusable; multiple projects can be registered and accept ETH concurrently.
✅ The goal is a preset amount of ETH.
  ✅- This cannot be changed after a project gets created.
- Regarding contributing:
  ✅- The contribute amount must be at least 0.01 ETH.
  ✅- There is no upper limit.
  ✅- Anyone can contribute to the project, including the creator.
  ✅- One address can contribute as many times as they like.
- Regarding tiers:
  - There are three tiers.
  - Bronze tier is granted to anyone contribution.
  - Silver tier is granted to a total contribution of at least 0.25 ETH.
  - Gold tier is granted to a total contribution of at least 1 ETH.
  - Tiers should be granted immediately so other apps can read them.
  ✅- "Total contribution" is scoped per-project (like kickstarter).
- If the project is not fully funded within 30 days:
  - The project goal is considered to have failed.
  - No one can contribute anymore.
  - Supporters get their money back.
  - Tier grants are revoked.
- Once a project becomes fully funded:
  ✅- No one else can contribute (however, the last contribution can go over the goal).
  - The creator can withdraw any percentage of contributed funds.
✅- The creator can choose to cancel their project before the 30 days are over, which has the same effect as a project failing.

Quick start

The first things you need to do are cloning this repository and installing its dependencies:

git clone https://github.com/nomiclabs/hardhat-hackathon-boilerplate.git
cd hardhat-hackathon-boilerplate
npm install

Once installed, let's run Hardhat's testing network:

npx hardhat node

Then, on a new terminal, go to the repository's root folder and run this to deploy your contract:

npx hardhat run scripts/deploy.js --network localhost

Finally, we can run the frontend with:

cd frontend
npm install
npm start

Note: There's an issue in ganache-core that can make the npm install step fail.

If you see npm ERR! code ENOLOCAL, try running npm ci instead of npm install.

Open http://localhost:3000/ to see your Dapp. You will need to have Metamask installed and listening to localhost 8545.

User Guide

You can find detailed instructions on using this repository and many tips in its documentation.

For a complete introduction to Hardhat, refer to this guide.

What’s Included?

Your environment will have everything you need to build a Dapp powered by Hardhat and React.

Troubleshooting

  • Invalid nonce errors: if you are seeing this error on the npx hardhat node console, try resetting your Metamask account. This will reset the account's transaction history and also the nonce. Open Metamask, click on your account followed by Settings > Advanced > Reset Account.

Feedback, help and news

We'd love to have your feedback on this tutorial. Feel free to reach us through this repository or our Discord server.

Also you can follow us on Twitter.

Happy buidling!

crowdfundr's People

Contributors

alcuadrado avatar fvictorio avatar aarondovturkel avatar feugenea avatar fzeoli avatar viarnes avatar

Stargazers

 avatar Alexander avatar

Watchers

James Cloos avatar 0xZakk 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.