message: clm8 docs: explain cross-contract dependencies
diff: @@ -17,3 +17,15 @@ The contracts are deployed in this order:
  3. Governor.sol
  4. NetEmissionsTokenNetwork.sol
  +The deploy scripts are located in the `deploy/` folder.
  +
  +### Explaining cross-contract dependencies
  +
  +The deployment script runs in this particular order because some variables need to be set up on the latter contracts that point to the former contracts for correct permissioning (i.e. ensuring that only the Governor has permission to collect and burn DAO tokens). In `deploy/dao.js` (the script used to deploy Timelock and Governor), we can see at the bottom of the file:
  +
  +```js
  +module.exports.tags = ['DAO'];
  +module.exports.dependencies = ['DAOToken'];
  +```
  +
  +The tag 'DAO' is set so that the Timelock and Governor can be deployed individually with `npx hardhat deploy --tags DAO`. There is also a dependency for the DAOToken, because the Governor takes an argument for the address of the DAOToken. Fortunately, the deploy script takes care of this automatically, but it gives us flexibility to deploy contracts individually.
  