Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feat(etherscan): Implemented Some APIs for stats #2653

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

woxjro
Copy link
Contributor

@woxjro woxjro commented Oct 27, 2023

The following APIs have been implemented.

Motivation

Thank you for developing such fantastic software. I'm working on a project called "lazy-etherscan",
and I would like to display statistical information about Ethereum within it.
After reviewing "ether-rs", I noticed that this functionality was not yet implemented,
so I decided to create this pull request.

Solution

I have implemented several of the statistical APIs from Etherscan's API documentation (https://docs.etherscan.io/api-endpoints/stats-1),
excluding the PRO features and "Get Ethereum Node Size". I have also added some tests.
Additionally, I needed to handle date information, so I added the "chrono" crate to "ethers-rs."

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@woxjro woxjro force-pushed the feat/etherscan/stats branch 2 times, most recently from ab15bc9 to de1760a Compare October 29, 2023 13:16
The following APIs have been implemented.
- https://docs.etherscan.io/api-endpoints/stats-1
    - Get Total Supply of Ether (`ethsupply`)
    - Get Total Supply of Ether 2 (`ethsupply2`)
    - Get Ether Last Price (`ethprice`)
    - Get Total Node Count (`nodecount`)
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, ty

@mattsse mattsse merged commit b3f0be7 into gakonst:master Oct 30, 2023
16 of 19 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants