An open API service indexing awesome lists of open source software.

https://github.com/threshold-network/token-supply-endpoint

Cloud functions for estimating circulating token supply
https://github.com/threshold-network/token-supply-endpoint

Last synced: 11 months ago
JSON representation

Cloud functions for estimating circulating token supply

Awesome Lists containing this project

README

          

# token-supply-endpoint

This repository hosts google cloud functions for estimating circulating token
supply, one per top-level folder.

To deploy:

+ Choose "Allow unauthenticated invocations" when given the choice since it's a
public api.
+ The google cloud function needs to have an environment variabable set:
`WEB3_PROVIDER_URI=https://eth-mainnet.alchemyapi.io/v2/`. It doesn't
have to be alchemy, but this is hard-coded for mainnet.
+ Copy all the files to the google cloud function source and set the entry
point to `main`.

To test locally:

+ set `WEB3_PROVIDER_URI=https://eth-mainnet.alchemyapi.io/v2/` (or
whatever mainnet provider you want - I used
[alchemy](https://www.alchemy.com/)) in the command line.
[direnv](https://direnv.net/) is fantastic for this and is ignored in
`.gitignore`.
+ modify main.py to call `print(main({}))`
+ run `$ pip install -r requirements.txt`
+ run `$ python main.py`