archethic-foundation / archethic-foundation/fetch-api-service
Provide an API to supply the current % of supply remaining for each tokenomics item
- Dominant language
- Elixir
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the solution you'd like
So that the website can provide the information dynamically, provide an API to supply the current % of supply remaining for each tokenomics item.
For each address, provide, initial value and current balance in json with
`address` = Wallet's address (hard coded) - String
`original_supply` = Original Supply (hard coded) - double
`current_balance` = Current Balance - double (use graphQL `balance` request)
```
{
"addresses": [
{
"address": "0000E0EF0C5A8242D7F743E452E3089B7ACAC43763A3F18C8F5DD38D22299B61CE0E",
"original_supply": 381966011,
"current_balance": 350000000,
},
{
"address": "000047C827E93C4F1106906D3F43546EB09176F03DFF15275759D47BF33D9B0D168A",
"original_supply": 236067977,
"current_balance": 220000000.24564,
},
{
"address": "000012023D76D65F4A20E563682522576963E36789897312CB6623FDF7914B60ECEF",
"original_supply": 145898033,
"current_balance": 140000000.34322,
},
{
"address": "00004769C94199BCA872FFAFA7CE912F6DE4DD8B2B1F4A41985CD25F3C4A190C72BB",
"original_supply": 90169943,
"current_balance": 85000000.34543,
},
{
"address": "0000DBE5D04070411325BA8254BC0CE005DF30EBFDFEEFADBC6659FA3D5FA3263DFD",
"original_supply": 55728090,
"current_balance": 50000000.342,
},
{
"address": "0000BB90E7EC3051BF7BE8D2BF766DA8BED88AFA696D282ACF5FF8479CE787397E16",
"original_supply": 34441857,
"current_balance": 30000000.342,
},
{
"address": "000050CEEE9CEEB411FA027F1FB9247FE04297FF00358D87DE4B7B8F2A7051DF47F7",
"original_supply": 21286236,
"current_balance": 20000000.00000,
}
]
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the API entry point and the existing GraphQL balance request. The work is done when an API response returns each specified wallet address with its hard-coded original_supply and current_balance values obtained through the balance query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir, graphql
- Domain
- api, backend, blockchain
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100