Skip to content

Commit 7ea8feb

Browse files
committed
chore: extract services
1 parent 5f51318 commit 7ea8feb

File tree

377 files changed

+105
-31227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

377 files changed

+105
-31227
lines changed

.env-sample

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
EOSIO_SOCKET_ENDPOINT=ws://50.17.129.61:8080
2-
EOS_NODEOS_HOST=50.17.118.93
3-
EOS_NODEOS_PORT=8888
4-
HASURA_API=http://x.x.x.x:8088/v1/graphql
5-
HASURA_GRAPHQL_AUTH_HOOK=http://x.x.x.x:3000
6-
HASURA_GRAPHQL_ADMIN_SECRET=super-secret
7-
HASURA_HOST=x.x.x.x
8-
CHAINGRAPH_API_DOMAIN=api.chiangraph.io
9-
CHAINGRAPH_CODEGEN_KEY=123
10-
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906
11-
MAX_ACTIONS_LIMIT=1000
1+
AUTH_HOOK=http://localhost:3000
2+
ADMIN_SECRET=super-secret
3+
DATABASE_URL=postgres://user:pass@postgres:5432/chaingraph?sslmode=disable

.gitignore

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
.history
2-
dist/
3-
node_modules/
2+
43
*.log
54
.DS_Store
6-
abi.json
75

86
.env
97
!.env.example
108
.ssh
11-
12-
# temporary copy hack
13-
services/auth/modules
14-
services/core/modules
15-
16-
services/nginx/*
17-
!services/nginx/nginx.tmpl
18-
19-
services/eos-api/src/data/*

CONTRIBUTING.md

+10-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Contributing to DreamStack RxDemux
1+
# Contributing to ChainGraph
22

33
Interested in contributing? That's awesome! Here are some guidelines to get started quickly and easily:
44

55
- [Reporting An Issue](#reporting-an-issue)
66
- [Bug Reports](#bug-reports)
77
- [Feature Requests](#feature-requests)
88
- [Change Requests](#change-requests)
9-
- [Working on DreamStack RxDemux](#working-on-dreamstack-rxdemux)
9+
- [Working on ChainGraph](#working-on-chaingraph-node)
1010
- [Feature Branches](#feature-branches)
1111
- [Submitting Pull Requests](#submitting-pull-requests)
1212
- [Testing and Quality Assurance](#testing-and-quality-assurance)
@@ -16,7 +16,7 @@ Interested in contributing? That's awesome! Here are some guidelines to get star
1616

1717
## Reporting An Issue
1818

19-
If you're about to raise an issue because you think you've found a problem with DreamStack RxDemux
19+
If you're about to raise an issue because you think you've found a problem with ChainGraph
2020
, or you'd like to make a request for a new feature in the codebase, or any other reason… please read this first.
2121

2222
The GitHub issue tracker is the preferred channel for [bug reports](#bug-reports), [feature requests](#feature-requests), and [submitting pull requests](#submitting-pull-requests), but please respect the following restrictions:
@@ -35,11 +35,11 @@ Guidelines for bug reports:
3535
reported.
3636

3737
1. **Check if the issue has been fixed** — look for [closed issues in the
38-
current milestone](https://github.com/telosdreamstack/dreamstack-rxdemux/issues?q=is%3Aissue+is%3Aopen) or try to reproduce it using the latest `master` branch.
38+
current milestone](https://github.com/chaingraph/chaingraph-node/issues?q=is%3Aissue+is%3Aopen) or try to reproduce it using the latest `master` branch.
3939

4040
A good bug report shouldn't leave others needing to chase you up for more information. Be sure to include the details of your environment and relevant tests that demonstrate the failure.
4141

42-
[Report a bug](https://github.com/telosdreamstack/dreamstack-rxdemux/labels/bug)
42+
[Report a bug](https://github.com/chaingraph/chaingraph-node/labels/bug)
4343

4444
### Feature Requests
4545

@@ -51,29 +51,29 @@ Feature requests are welcome. Before you submit one be sure to have:
5151

5252
### Change Requests
5353

54-
Change requests cover both architectural and functional changes to how DreamStack RxDemux works. If you have an idea for a new or different dependency, a refactor, or an improvement to a feature, etc - please be sure to:
54+
Change requests cover both architectural and functional changes to how ChainGraph works. If you have an idea for a new or different dependency, a refactor, or an improvement to a feature, etc - please be sure to:
5555

5656
1. **Use the GitHub search** and check someone else didn't get there first
5757
1. Take a moment to think about the best way to make a case for, and explain what you're thinking. Are you sure this shouldn't really be
5858
a [bug report](#bug-reports) or a [feature request](#feature-requests)? Is it really one idea or is it many? What's the context? What problem are you solving? Why is what you are suggesting better than what's already there?
5959

60-
## Working on DreamStack RxDemux
60+
## Working on ChainGraph
6161

62-
Code contributions are welcome and encouraged! If you are looking for a good place to start, check out the [good first issue](https://github.com/telosdreamstack/dreamstack-rxdemux/labels/good%20first%20issue) label in GitHub issues.
62+
Code contributions are welcome and encouraged! If you are looking for a good place to start, check out the [good first issue](https://github.com/chaingraph/chaingraph-node/labels/good%20first%20issue) label in GitHub issues.
6363

6464
Also, please follow these guidelines when submitting code:
6565

6666
### Submitting Pull Requests
6767

6868
Pull requests are awesome. If you're looking to raise a PR for something which doesn't have an open issue, please think carefully about [raising an issue](#reporting-an-issue) which your PR can close, especially if you're fixing a bug. This makes it more likely that there will be enough information available for your PR to be properly tested and merged.
6969

70-
We follow the [github flow strategy](https://guides.github.com/introduction/flow) for releasing updates. Fork out and create a branch out of master, then create your pull request. We squash the pull requests following conventional commits, we appreciate if you can follow this convention on your commits as well https://developers.blockmatic.io/open-source/contributing-guidelines
70+
We follow the [github flow strategy](https://guides.github.com/introduction/flow) for releasing updates. Fork out and create a branch out of master, then create your pull request. We squash the pull requests following __conventional commits__, we appreciate if you can follow this convention on your commits as well https://developers.blockmatic.io/open-source/contributing-guidelines
7171

7272
### Testing and Quality Assurance
7373

7474
Never underestimate just how useful quality assurance is. If you're looking to get involved with the code base and don't know where to start, checking out and testing a pull request is one of the most useful things you could do.
7575

76-
Essentially, [check out the latest develop branch](#working-on-DreamStack-RxDemux), take it for a spin, and if you find anything odd, please follow the [bug report guidelines](#bug-reports) and let us know!
76+
Essentially, [check out the latest develop branch](#working-on-chaingraph), take it for a spin, and if you find anything odd, please follow the [bug report guidelines](#bug-reports) and let us know!
7777

7878
## Conduct
7979

@@ -138,9 +138,3 @@ By making a contribution to this project, I certify that:
138138
maintained indefinitely and may be redistributed consistent with
139139
this project or the open source license(s) involved.
140140
```
141-
142-
## References
143-
144-
- Overall CONTRUB adapted from https://github.com/EOSIO/universal-authenticator-library/blob/master/CONTRIBUTING.md
145-
- Overall CONTRIB adapted from https://github.com/mathjax/MathJax/blob/master/CONTRIBUTING.md
146-
- Conduct section adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

IMPORTANT.md

-31
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2020 blockmatic.io and its contributors. All rights reserved.
1+
Copyright (c) 2021 blockmatic.io and its contributors. All rights reserved.
22

33
The MIT License
44

README.md

+49
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,44 @@
22

33
A realtime GraphQL API and indexing service for blockchain applications.
44

5+
## TODO:
6+
7+
- remove hasura-client in favor of node-postgres
8+
- upgrade hasura engine.
9+
- update mappings to that it uses primary_key type attrib
10+
- update schema
11+
- review action data saved, reduce space
12+
- use pg views for tokens and balances
13+
- update data indexers
14+
- setup jungle and telos streaming
15+
- improve history loading
16+
- stress test with eosio.token data
17+
- restore
18+
- update documentation, create a gitbook
19+
- document history of the project, philosophy and why not history tools ( cos it's bloated )
20+
- how to limit socket connections, rate limiting, blacklisting ips.
21+
- review logger, polluting pm2 logs
22+
23+
### Schemas
24+
25+
Balances
26+
27+
chain - text, primary key
28+
contract - text, primary key
29+
account - text, primary key
30+
balance - text
31+
symbol - text, primary key
32+
33+
Tokens
34+
35+
chain - text, primary key
36+
contract - text, primary key
37+
symbol - text, primary key
38+
precision - integer
39+
supply - text
40+
max_supply - text, nullable
41+
issuer - text
42+
543
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
644
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
745

@@ -33,6 +71,17 @@ A realtime GraphQL API and indexing service for blockchain applications.
3371
- Supports ad-hoc external graph stitching and federation.
3472
- Supports ad-hoc offchain graphql resolvers.
3573

74+
## Hasura Resources
75+
76+
- [Building your schema](https://docs.hasura.io/1.0/graphql/manual/schema/index.html)
77+
- [GraphQL Queries](https://docs.hasura.io/1.0/graphql/manual/queries/index.html)
78+
- [GraphQL Mutations](https://docs.hasura.io/1.0/graphql/manual/mutations/index.html)
79+
- [GraphQL Subscriptions](https://docs.hasura.io/1.0/graphql/manual/subscriptions/index.html)
80+
- [Event Triggers](https://docs.hasura.io/1.0/graphql/manual/event-triggers/index.html)
81+
- [Authentication/Access control](https://docs.hasura.io/1.0/graphql/manual/auth/index.html)
82+
- [Database Migrations](https://docs.hasura.io/1.0/graphql/manual/migrations/index.html)
83+
- [Guides/Tutorials/Resources](https://docs.hasura.io/1.0/graphql/manual/guides/index.html)
84+
3685
## Architecture
3786

3887
<center>

Taskfile.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ silent: true
66
tasks:
77
console:
88
cmds:
9-
- hasura console --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
9+
- hasura console --admin-secret=$ADMIN_SECRET
1010

1111
seed:
1212
cmds:
13-
- hasura seeds apply --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
13+
- hasura seeds apply --admin-secret=$ADMIN_SECRET
1414

1515
up:
1616
cmds:
@@ -33,14 +33,13 @@ tasks:
3333

3434
boot:
3535
cmds:
36-
- docker-compose up -d --build hasura auth
37-
- sleep 30
38-
- hasura migrate apply --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
39-
- hasura metadata apply --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
40-
- hasura seeds apply --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
41-
- docker-compose up -d --build core
36+
- docker-compose up -d --build
37+
- sleep 20
38+
- hasura migrate apply --admin-secret=$ADMIN_SECRET
39+
- hasura metadata apply --admin-secret=$ADMIN_SECRET
40+
- hasura seeds apply --admin-secret=$ADMIN_SECRET
4241

4342
apply:
4443
cmds:
45-
- hasura migrate apply --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
46-
- hasura metadata apply --project services/hasura --admin-secret=$HASURA_GRAPHQL_ADMIN_SECRET
44+
- hasura migrate apply --admin-secret=$ADMIN_SECRET
45+
- hasura metadata apply --admin-secret=$ADMIN_SECRET

0 commit comments

Comments
 (0)