This project is built using hardhat. All the contracts required to run / manage a round can be found here. If you come across any vulnerabilities, do create an issue / raise a PR to help improve the contracts. ^_^
.
├── contracts # Smart contracts
├ ├── utils # useful utils
├ ├── program # program contracts
├ ├ ├── ProgramFactory.sol # factory contract which deploys program
├ ├ ├── ProgramImplementation.sol # program contract
├ ├── round # round contracts
├ ├ ├── RoundFactory.sol # factory contract which deploys round
├ ├ ├── RoundImplementation.sol # round contract
├ ├── votingStrategy # voting strategy
├ ├ ├── IVotingStrategy.sol # voting strategy interface
├ ├ ├── QuadraticFundingVotingStrategy.sol # QF voting strategy
├── scripts # Deploy scripts for smart contracts
├── docs # documentation
├── test # Test for smart contracts
├── .env.example # .env template
├── .eslintrc.js # Eslint config
├── .prettierrc # Prettier config
├── .solhint.json # Solhint config
├── hardhat.config.json # Hardhat configuration
├── package.json # Package configuration
├── tsconfig.json # Typescript configuration
└── README.md
- Program Operators: wallets that have the permission to create & manage the program
- Program: maintained by Program Operators which together form a team
- Round Operators: wallets that have the permission to create & manage the round
- Round: created by a Program and deal with everything relating to running a round
- Voter: wallet who cast a vote to a grant during the round
To know how the contracts should be setup, refer DEPLOY_STEPS.md
To know the addresses are deployed on which network. refer CHAINS.md
s To contribute to this project, fork the project and follow the instructions at DEV.md
This is built and maintained using hardhat
These steps would have to be done per chain but there are intended to be deployed only once
Program
- Deploy
ProgramFactory - Deploy
ProgramImplementation - Link
ProgramImplementationto ProgramFactory contract
Round
- Deploying all voting strategy (contracts under
votingStrategy/) - Deploy
RoundFactory - Deploy
RoundImplementation - Link
RoundImplementationtoRoundFactorycontract
- To create a program, you would not deploy a contract but instead, rely on the create function on the
ProgramFactoryto create a clone of the already deployedProgramImplementationcontract - Any interaction in terms of updating parameters etc can be performed against the
ProgramImplementationcontract itself
The ProgramFactory enables us to have upgradable contracts on ProgramImplementation
- To create a round, you would not deploy a contract but instead, rely on the create function on the
RoundFactoryto create a newRoundImplementationcontract. - The user would have to choose a voting strategy like
QuadraticFundingVotingStrategy(already deployed via instruction mention in DEPLOY_STEPS.md) - Any interaction in terms of updating parameters etc can be performed against the
RoundImplementationcontract itself
The RoundFactory enables us to have upgradable contracts on RoundImplementation.
To know how the contracts should be setup, refer DEPLOY_STEPS.md
To know the addresses are deployed on which network. refer CHAINS.md
To contribute to this project, fork the project and follow the instructions at DEV.md
The contract documentation has been generated using primitive-dodoc and can be found over at docs/contracts