Skip to content

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

Notifications You must be signed in to change notification settings

Zodomo/RaisePool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 - zodomo@proton.me - Zodomo.eth

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

(back to top)

Acknowledgments

(back to top)

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published