Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path overrides for the dynamic path above for KOIN, VHP, and the Claim contract using the proto-js generated types to interact with those contracts. (Other system contracts can be added later) #9

Closed
Tracked by #1
mvandeberg opened this issue May 3, 2024 · 1 comment
Labels

Comments

@mvandeberg
Copy link
Member

No description provided.

@mvandeberg mvandeberg mentioned this issue May 3, 2024
8 tasks
@mvandeberg mvandeberg added the task label May 3, 2024
@mvandeberg
Copy link
Member Author

The REST API already supports the behavior we require.

❯ curl -X 'GET' \
  'http://localhost:3000/v1/contract/claim/get_info' \
  -H 'accept: application/json' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   131    0   131    0     0   6667      0 --:--:-- --:--:-- --:--:--  6894
{
  "value": {
    "total_eth_accounts": 3754,
    "eth_accounts_claimed": 1854,
    "total_koin": "9973874402587865",
    "koin_claimed": "5559687063468140"
  }
}
❯ curl -X 'GET' \
  'http://localhost:3000/v1/contract/koin/total_supply' \
  -H 'accept: application/json' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    28    0    28    0     0   1132      0 --:--:-- --:--:-- --:--:--  1166
{
  "value": "3951501719031254"
}
❯ curl -X 'GET' \
  'http://localhost:3000/v1/contract/vhp/total_supply' \
  -H 'accept: application/json' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    28    0    28    0     0   1340      0 --:--:-- --:--:-- --:--:--  1400
{
  "value": "1736668186011901"
}
❯ curl -X 'GET' \
  'http://localhost:3000/v1/token/koin/total_supply' \  
  -H 'accept: application/json' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    29    0    29    0     0     60      0 --:--:-- --:--:-- --:--:--    60
{
  "value": "39515045.37153799"
}
❯ curl -X 'GET' \
  'http://localhost:3000/v1/token/vhp/total_supply' \
  -H 'accept: application/json' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    29    0    29    0     0   1057      0 --:--:-- --:--:-- --:--:--  1074
{
  "value": "17366654.75040361"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant