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

Add contracts supply endpoint #21

Closed
abchrisxyz opened this issue Apr 2, 2022 · 4 comments
Closed

Add contracts supply endpoint #21

abchrisxyz opened this issue Apr 2, 2022 · 4 comments
Labels

Comments

@abchrisxyz
Copy link
Owner

API:

  • contracts/supply?token_id=<token_id>

Returns total ERG or token supply in contract addresses.

For ERG, this could be interpreted as TVL, although not all contracts are DeFi related.
Tokens base supply is often held in a contract (SigUSD bank contract for instance), so results are less straight forward to interpret. In some cases, addresses/{address}/balance can be used to deduce the base supply (again, SigSUD is a good example here).

@abchrisxyz
Copy link
Owner Author

abchrisxyz commented Apr 2, 2022

Add option to exclude treasury contract:

contracts/supply?token_id=<token_id>&include_treasury=false

Document it likely is only relevant for ERG

@abchrisxyz
Copy link
Owner Author

abchrisxyz commented Apr 2, 2022

Consider accepting a list of addresses to exclude.

@abchrisxyz abchrisxyz reopened this Apr 2, 2022
@abchrisxyz
Copy link
Owner Author

Keep it simple and exclude coinbase and treasury addresses at all times.

@abchrisxyz
Copy link
Owner Author

Done in 79e5bfd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant