Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e14a265
Changes in Staging (#26)
mrenoon Mar 29, 2019
0e43b2d
[fix] Fix reputation point null values for KYC Admin (#27)
FrancisMurilloDigix Apr 4, 2019
cb90a5d
make use of denominator for rp and qp in /points endpoint (#30) (#31)
mrenoon Apr 10, 2019
c1773f2
[fix] Fix reputation point null values for KYC Admin (#27)
FrancisMurilloDigix Apr 4, 2019
6ac6b53
make use of denominator for rp and qp in /points endpoint (#30) (#31)
mrenoon Apr 10, 2019
a860ec0
Merge branch 'develop' of https://github.com/DigixGlobal/info-server …
Apr 10, 2019
922d9a8
Feature/sprint 7e (#35)
mrenoon Apr 23, 2019
d4715d3
add route for transaction configs (gas limits) (Needed for DGDG-478) …
Apr 28, 2019
436b23c
[fix] Add user broadcast for reveal special proposal (#36)
FrancisMurilloDigix Apr 29, 2019
4a80ed6
Merge pull request #38 from DigixGlobal/feature/sprint-8b
mrenoon Apr 29, 2019
4303e2b
modify some graphql types to Enum (#39)
May 14, 2019
659e4d7
[fix] Fix actionableStatus enum suffixes (#41)
FrancisMurilloDigix May 14, 2019
ca82fc1
Merge pull request #42 from DigixGlobal/feature/sprint-8d
mrenoon May 16, 2019
825c3fb
add changes from staging
mrenoon May 16, 2019
a431499
price info and remaining funds (Needed for DGDG-561)
May 24, 2019
5c43cf1
remove merge conflicts accidentally added
mikej-digix Jun 2, 2019
f06ed85
Merge pull request #43 from DigixGlobal/fix/remove-merge-conflict
May 31, 2019
e0b6b54
Merge pull request #44 from DigixGlobal/feature/sprint-9
mrenoon Jun 19, 2019
31155a8
Open source documentation (#45)
Jul 2, 2019
d180e81
script to update the address details to latest
Aug 6, 2019
6d9a4e3
(Needed for DGDG-584) Update participant and moderator status at the …
Sep 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rules:
no-restricted-syntax: 0
guard-for-in: 0
import/no-extraneous-dependencies: 0
import/no-dynamic-require: 0
no-use-before-define: 0
no-param-reassign: 0
no-plusplus: 0
Expand Down
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at . All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
81 changes: 81 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Contributing to Info Server

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](./CODE_OF_CONDUCT.md "code of conduct").

## Submitting a Pull Request
1. Fork this repository
2. Create a feature branch based of `develop` branch
3. Implement your feature or bug fix
4. Add, commit, and push your changes
5. Submit a pull request

### Considerations

- If needed, update documentation or behaviors
- If possible, avoid installing dependencies and if so use an exact
version `x.y.z` instead of using semantic version
- As much as possible, squash commits before filing a PR

# Development
## Dependency

Before setting up Info server, remember to start a ganache RPC client and deploy the [DigixDAO smart contracts](https://github.com/dao-contracts).

Aside from setting up this server, remember to start this server before
[dao-server](https://github.com/DigixGlobal/dao-server "dao-server")
and all its dependencies since Info server sends requests to `dao-server`.

## Code Structure
* `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`, `transactions` and `kyc`, and the rest are placed in `index.js`

* `scripts/`

This is where most of the business logic has been implemented

* `watchedFunctions.js`

Includes the list of the functions from DigixDAO smart contracts that are being watched by Info-server. This also includes broadcasting of GraphQL subscriptions.

* `blocks.js`

Info-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 (`watchedFunctionsList` in `helpers/constants.js`) and add these transactions to the database. `blocks.js` includes the logic to watch for new blocks.

* `transactions.js`

This includes the logic for filtering from transactions in new blocks. This also calls the respective functions from `proposals.js`, `addresses.js` and `dao.js`, depending on the state transition brought about by that specific transaction.

* `proposals.js`

Includes the logic to implement transition of a DigixDAO project between states.

* `addresses.js`

Includes the logic to update any information related to a DigixDAO participant/moderator, or their stakes/votes.

* `dao.js`

Includes 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.js`

This script contains the logic to communicate with DigixDAO's [DAO Server](https://github.com/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.js` file, that includes the queries, mutations and subscriptions.
31 changes: 31 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# LICENSE

The code in this repository is licensed under the [BSD-3 Clause](https://opensource.org/licenses/BSD-3-Clause).

Copyright (c) 2019, DIGIXGLOBAL PRIVATE LIMITED
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading
Loading