We only accept pull request that is assigned an accepted issue. By participating in this project, you agree to abide by the code of conduct.
- Fork this repository
- Create a feature branch based of
developbranch - Implement your feature or bug fix
- Add, commit, and push your changes
- Submit a pull request
- If needed, update documentation or behaviors
- If possible, avoid installing dependencies and if so use an exact
version
x.y.zinstead of using semantic version - As much as possible, squash commits before filing a PR
Before setting up Info server, remember to start a ganache RPC client and deploy the DigixDAO smart contracts.
Aside from setting up this server, remember to start this server before
dao-server
and all its dependencies since Info server sends requests to dao-server.
-
dbWrapper/Wrapper functions to read/write to MongoDB
-
dijixWrapper/Wrapper functions to fetch documents from IPFS
-
cacheWrapper/Wrapper functions to read/write to cache
-
routes/API endpoints for DigixDAO. These are sub-divided into
proposals,transactionsandkyc, and the rest are placed inindex.js -
scripts/This is where most of the business logic has been implemented
-
watchedFunctions.jsIncludes the list of the functions from DigixDAO smart contracts that are being watched by Info-server. This also includes broadcasting of GraphQL subscriptions.
-
blocks.jsInfo-server queries to check if any new blocks have been mined. If yes, it fetches all transactions from those blocks, filters them to only the transactions that are of interest (
watchedFunctionsListinhelpers/constants.js) and add these transactions to the database.blocks.jsincludes the logic to watch for new blocks. -
transactions.jsThis includes the logic for filtering from transactions in new blocks. This also calls the respective functions from
proposals.js,addresses.jsanddao.js, depending on the state transition brought about by that specific transaction. -
proposals.jsIncludes the logic to implement transition of a DigixDAO project between states.
-
addresses.jsIncludes the logic to update any information related to a DigixDAO participant/moderator, or their stakes/votes.
-
dao.jsIncludes the logic to update the generic state of DigixDAO, which covers configuration values, DigixDAO timeline, total DGDs staked in the contracts and so on.
-
notifier.jsThis script contains the logic to communicate with DigixDAO's DAO Server, which also includes the HMAC logic.
-
-
types/The code in this directory contains the GraphQL schemas, types and resolvers. These are then used in the
graphql.jsfile, that includes the queries, mutations and subscriptions.