CC Protocol is a decentralized crowdfunding protocol designed to help creators launch and manage campaigns across multiple platforms. By providing a standardized infrastructure, the protocol simplifies the process of creating, funding, and managing crowdfunding initiatives in web3 across different platforms.
- Cross-listable campaign creation
- Multiple treasury models
- Secure fund management
- Customizable protocol parameters
- Foundry
- Solidity ^0.8.20
- Clone the repository:
git clone https://github.com/ccprotocol/ccprotocol-contracts.git
cd ccprotocol-contracts- Install dependencies:
forge install- Copy environment template:
cp .env.example .env- Configure your
.envfile following the template in.env.example
Comprehensive documentation is available in the docs/ folder:
- Technical specifications
- Contract interfaces
- Deployment guides
- Development setup instructions
To view the documentation:
cd docsforge build# Run all tests
forge test
# Run specific test
forge test --match-test testFunctionName
# Run tests with more verbose output
forge test -vvv# Start local blockchain
anvil
# Deploy to local network
forge script script/DeployAll.s.sol:DeployAll --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --broadcast# Deploy to any configured network
forge script script/DeployAll.s.sol:DeployAll --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcastGlobalParams: Protocol-wide parameter managementCampaignInfoFactory: Campaign creation and managementTreasuryFactory: Treasury contract deployment
AllOrNothing: Funds refunded if campaign goal not met
TestTokenis a mock ERC20 token used only for testing and development purposes.- It is located in the
mocks/directory and should not be included in production deployments.
- Deploy
GlobalParams - Deploy
TreasuryFactory - Deploy
CampaignInfoFactory
For local testing or development, the
TestTokenmock token needs to be deployed before interacting with contracts requiring an ERC20 token.
Key environment variables to configure in .env:
PRIVATE_KEY: Deployment wallet private keyRPC_URL: Network RPC endpoint (can be configured for any network)SIMULATE: Toggle simulation mode- Contract address variables for reuse
For a complete list of variables, refer to .env.example.
Security audit reports can be found in the audits/ folder. We regularly conduct security audits to ensure the safety and reliability of the protocol.
We welcome all contributions to the Creative Crowdfunding Protocol. If you're interested in helping, here's how you can contribute:
- Report bugs by opening issues
- Suggest enhancements or new features
- Submit pull requests to improve the codebase
- Improve documentation to make the project more accessible
Before contributing, please read our detailed Contributing Guidelines for comprehensive information on:
- Development workflow
- Coding standards
- Testing requirements
- Pull request process
- Smart contract security considerations
Join our community on Discord for questions and discussions.
Read our Code of Conduct to keep our community approachable and respectful.
Made with contrib.rocks.
This project is licensed under the MIT License.