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
- Host: GitHub
- URL: https://github.com/threshold-network/token-supply-endpoint
- Owner: threshold-network
- Created: 2022-03-09T14:36:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-12T19:19:06.000Z (almost 2 years ago)
- Last Synced: 2025-05-30T00:07:50.062Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 2
- Watchers: 16
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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`