Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coin total supply from DB API endpoint #2862

Merged
merged 2 commits into from
Nov 19, 2019

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Nov 15, 2019

Motivation

Calculate the total supply of POA Core coin and use that endpoint for CMC and exchanges.

Changelog

  • the new JSON RPC endpoint in stats module
  • the data is retrieved from ETS, ETS is updated every hour by default or configured via ADDRESS_SUM_CACHE_PERIOD ENV var

Addition of ENV vars to the docs blockscout/docs#10

API will be available at /api?module=stats&action=ethsupply
The similar API but from CoinGecko moved to /api?module=stats&action=ethsupplyexchange

Screenshot 2019-11-15 at 16 43 28

Checklist for your Pull Request (PR)

@vbaranov vbaranov self-assigned this Nov 15, 2019
@vbaranov vbaranov force-pushed the vb-coin-total-supply-from-db-api branch from 148c19f to 9f93584 Compare November 15, 2019 12:49
vbaranov added a commit to blockscout/docs that referenced this pull request Nov 15, 2019
@vbaranov vbaranov force-pushed the vb-coin-total-supply-from-db-api branch from 9f93584 to 4b1b483 Compare November 15, 2019 13:03
@vbaranov vbaranov added the ready for review This PR is ready for reviews. label Nov 15, 2019
@vbaranov vbaranov force-pushed the vb-coin-total-supply-from-db-api branch from 4b1b483 to e6ab290 Compare November 15, 2019 13:12
@coveralls
Copy link

coveralls commented Nov 15, 2019

Pull Request Test Coverage Report for Build b031af9d-65e5-405a-ba61-602e5187f1dd

  • 12 of 15 (80.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 75.355%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/chain/cache/address_sum.ex 6 9 66.67%
Totals Coverage Status
Change from base Build 5cd75094-825f-4ac2-a66b-05a400dcc719: 0.04%
Covered Lines: 5259
Relevant Lines: 6979

💛 - Coveralls

@vbaranov vbaranov force-pushed the vb-coin-total-supply-from-db-api branch from e6ab290 to 6f68194 Compare November 15, 2019 13:45
@vbaranov vbaranov force-pushed the vb-coin-total-supply-from-db-api branch from 6f68194 to 3c3b609 Compare November 15, 2019 14:07
@vbaranov vbaranov force-pushed the vb-coin-total-supply-from-db-api branch from 3c3b609 to b87fc2d Compare November 15, 2019 14:17
@vbaranov vbaranov merged commit 29faeff into master Nov 19, 2019
@vbaranov vbaranov deleted the vb-coin-total-supply-from-db-api branch November 19, 2019 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants