Skip to content

carterax/crowdship

Repository files navigation

Crowdship

Tests codecov

Crowdship is an open source project built with simplicity in mind for anyone looking to setup their own crowdfunding initiative, with inspiration from the likes of kickstarter, indiegogo e.t.c Crowdship aims to be familiar while adding on concepts from the blockchain e.g

  • Governance Protocol
  • Concensus Mechanism

Features

  • Private Campaigns
  • Backers vote on fund management
  • Censorship resistant
  • Reward delivery assurance

Contract 📝

Quick Start ⚡️

To work on the contracts locally there are a few requirements

In the terminal, clone https://github.com/carterax/crowdship and install dependencies

git clone https://github.com/carterax/crowdship.git
cd crowdship
npm i

Compile and generate the contracts

npm run postinstall

Deploying to Ganache

After npm run migrate take note of the contract addresses returned in the terminal

ganache-cli --deterministic
npm run migrate

Interacting with the contracts on ganache

This opens up truffle console on the default development network; Open the console on rinkeby scroll to scripts.

npm run truffle-console
factory = await Factory.at("0x00") //replace 0x00 with your contract address
deployedCampaignCount = await factory.deployedCampaignCount()

Deploying to Remix

Make sure you have Metamask installed and setup

  • In the select input under workspaces select connect to localhost, Follow the instruction given in the modal.
  • Open and compile all contracts under ./contracts/*.sol using solc v0.8.0
  • Under compiler configuration enable optimization with a runs value of 1, hit the compile button
  • Under deploy & run transactions from the select dropdown, choose Injected web3
  • Deploy Factory.sol CampaignFactory.sol CampaignReward.sol and Campaign.sol, after deploying these contracts please take note of their addresses as they would be required for various implementations across some contracts.
  • After deployment you can now interact with the contract methods 🎉

Running tests ✅

Ensure ganche is running

npm run test

Scripts 🔨

Script Feature
npm run docs Generates documentation for the contracts, using Openzeppelin's docgen
npm run coverage Generates test coverage
npm run contract-size Outputs the contract size so far, run after compiling contracts
npm run truffle-console:rinkeby Opens truffle console with the network set to rinkeby

License

MIT