This repo contains:
- Utilities for calculating the circulating and total supply of utia on a given date.
- An API with endpoints that return the current circulating and total supply.
-
Run the API server
go run main.go
-
Verify the API server is running
curl http://0.0.0.0:8080 # Query the circulating supply curl http://0.0.0.0:8080/v0/circulating-supply # Query the total supply curl http://0.0.0.0:8080/v0/total-supply
# Get more info on available make commands.
make help
Note
Functions should ideally operate on utia values (of type int64
) rather than TIA values (of type float64
) to avoid loss of precsision. Utia values can be converted to TIA values (of type float64
) prior to responding to API requests.
The docker.yml workflow builds a Docker image and pushes it to a Scaleway container registry. The supply server is deployed via a Scaleway serverless container. CI will not automatically deploy the latest Docker image to the serverless container so you must do that manually if you want to deploy a new version of the supply server.