Understanding the fundamental ideas behind CreateDAO.
DAOFactory.sol
):
createDAO
is called, it deploys new proxy contracts for the DAO and its modules, pointing them to the registered implementations. It also manages the registration of new implementation versions (controlled by the factory owner).DAO.sol
):
DAOProposals.sol
) and proposal execution (DAOExecutor.sol
). It maintains references to the DAO’s specific Token, Treasury, and Staking contracts. It enforces governance rules like voting periods, quorum, and minimum proposal stake.DAOTokenProxy
/ DAOToken.sol
: The DAO’s specific governance token contract (usually ERC20-based). Used for voting power and potentially other utility.DAOStakingProxy
/ DAOStaking.sol
: Handles the staking of the governance token to determine voting power for proposals.DAOTreasuryProxy
/ DAOTreasury.sol
: Holds the DAO’s funds (native currency and ERC20 tokens). Transfers out of the treasury are controlled exclusively by passed proposals executed through the Core DAO contract.DAOPresaleProxy
/ DAOPresale.sol
):
proposePresale
proposal executed by the Core DAO contract would deploy a DAOPresaleProxy
using an implementation registered in the DAOFactory
).DAOFactory
deploys proxy contracts (DAOProxy
, DAOTokenProxy
, etc.). These proxies hold the state (data) and delegate calls to separate implementation contracts (DAO.sol
, DAOToken.sol
, etc.) which contain the logic. Upgrades are initiated via a governance proposal (proposeUpgrade
or proposeModuleUpgrade
) on the Core DAO contract. If passed and executed, the execute
function calls upgradeToAndCall
on the relevant proxy, pointing it to a new implementation address registered in the DAOFactory
.DAOFactory
and implementation contracts are deployed may vary. Check the Deployed Contracts section for the most up-to-date list of supported networks and contract addresses.