Skip to content

Commit

Permalink
add endpoints for vote season
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed May 25, 2024
1 parent 0b6cd70 commit 6e454fc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions code/kmd_ntx_api/explorers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def get_explorers(request):
def get_base_endpoint(coin):
if coin == "MIL":
return f"https://mil.kmdexplorer.io/api"
if coin == "VOTE2024":
return f"https://vote2024.explorer.lordofthechains.com/insight-api-komodo"

if coin == "MCL":
return f"https://explorer.marmara.io/insight-api-komodo"
Expand Down
14 changes: 14 additions & 0 deletions code/kmd_ntx_api/info_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
from kmd_ntx_api.explorers import get_explorers
from kmd_ntx_api.electrum import get_electrums, get_electrums_ssl, get_electrums_wss
from kmd_ntx_api.helper import json_resp
from kmd_ntx_api.notary_seasons import get_seasons_info, get_season
from kmd_ntx_api.logger import logger


def notary_season(request):
resp = get_season()
filters = []
return json_resp(resp, filters)


def notary_seasons(request):
resp = get_seasons_info()
filters = []
return json_resp(resp, filters)


def mined_between_blocks(request):
Expand Down
1 change: 0 additions & 1 deletion code/kmd_ntx_api/ntx_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def notaryfaucet_view(request):
if "message" in sent_tx_resp["result"]:
sent_tx_list = sent_tx_resp["result"]["message"]
for item in sent_tx_list:
logger.info(item)
if item[0] not in pending_index:
if item[4] > SINCE_INTERVALS['day']:
sum_24hrs += item[5]
Expand Down
8 changes: 8 additions & 0 deletions code/kmd_ntx_stats/urls_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@
path('api/info/notary_nodes/',
info_api.notary_nodes_info,
name='notary_nodes_info'),

path('api/info/notary_season/',
info_api.notary_season,
name='notary_season_info'),

path('api/info/notary_seasons/',
info_api.notary_seasons,
name='notary_seasons_info'),

path('api/info/ltc_txid_list/',
info_api.ltc_txid_list,
Expand Down

0 comments on commit 6e454fc

Please sign in to comment.