Git Product home page Git Product logo

raisepool's Introduction

Contributors Forks Stargazers Issues


RaisePool

A crowdfunded raise contract that incentivizes deposits by minting SocialCredits to participants.

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

RaisePool is a contract that facilitates collecting deposits for a fundraising effort. The contract will allow refunds if the soft target is not reached by the deadline. If the soft target is reached at any point, refunds are disabled and the recipient can withdraw. Once a withdrawal is processed, the contract locks and prevents any future attempted deposits. Deposits cannot exceed the hard cap at all, and if the final depositor exceeds it, they will have the overage refunded to them during bid processing.

(back to top)

Built With

  • Ethereum
  • Solidity

(back to top)

Getting Started

RaisePool was designed using Foundry, so I recommend familiarizing yourself with that if required.

Prerequisites

  • Foundry
    curl -L https://foundry.paradigm.xyz | bash
    foundryup

Installation

  1. Set up your RaisePool project using Foundry
    forge init ProjectName
  2. Install RaisePool
    forge install zodomo/RaisePool --no-commit
  3. Import RaisePool
    Add the following above the beginning of your project's primary contract
    import "../lib/RaisePool/src/RaisePool.sol";
  4. Inherit the module
    Add the following to the contract declaration
    contract ProjectName is RaisePool {}
  5. Populate constructor arguments
    Add the following parameters and declaration to your constructor
    constructor(
         address _owner,
         address _incentiveToken,
         uint40 _deadline,
         uint96 _softTarget,
         uint96 _hardTarget
     ) RaisePool(_owner, _incentiveToken, _deadline, _softTarget, _hardTarget) {}

(back to top)

Usage

The contract is automatically configured upon deployment. All state transitions happen automatically. Once soft target is reached, withdrawals automatically enable and refunds disable. Once withdraw() is called, the contract locks permanently.

Call raise() to contribute to the fundraising effort. The receive() function also calls raise(), so participants are able to send ETH directly to the RaisePool contract address and have their raise processed properly.

Raise participants can call refund() after the deadline has been reached but only if the soft target also hasn't been reached.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the AGPL-3 License. See LICENSE.txt for more information.

(back to top)

Contact

Zodomo - @0xZodomo - [email protected] - Zodomo.eth

Project Link: https://github.com/Zodomo/RaisePool

(back to top)

Acknowledgments

(back to top)

raisepool's People

Contributors

zodomo avatar

Stargazers

 avatar Etch avatar xeno avatar

Watchers

 avatar  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.