Skip to content

API that returns the current circulating and total supply of TIA

Notifications You must be signed in to change notification settings

celestiaorg/supply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supply

This repo contains:

  1. Utilities for calculating the circulating and total supply of utia on a given date.
  2. An API with endpoints that return the current circulating and total supply.

Usage

  1. Run the API server

    go run main.go
  2. 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

Contributing

Helpful commands

# 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.

Deployment

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.

About

API that returns the current circulating and total supply of TIA

Resources

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •