Skip to content

Commit 13ebe3b

Browse files
committed
Add OETH supply endpoint
1 parent d533061 commit 13ebe3b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

logic/scripts/token_stats.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
ogn_contract = "0x8207c1ffc5b6804f6024322ccf34f29c3541ae26"
2525
ogv_contract = "0x9c354503c38481a7a7a51629142963f98ecc12d0"
2626
ousd_contract = "0x2a8e1e676ec238d8a992307b495b45b3feaa5e86"
27+
oeth_contract = "0x856c4efb76c1d1ae02e20ceb03a2a6a08b0b8dc3"
2728
dai_contract = "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359"
2829
ogn_staking_contract = "0x501804b374ef06fa9c427476147ac09f1551b9a0"
2930

@@ -160,6 +161,9 @@ def total_ogv():
160161
def total_ousd():
161162
return total_supply(ousd_contract)
162163

164+
def total_oeth():
165+
return total_supply(oeth_contract)
166+
163167
def fetch_ogn_stats(ogn_usd_price,staked_user_count,staked_token_count,ogn_stakers_count,ogn_staked_amount):
164168
total_supply = int(total_ogn())
165169

views/web_views.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,13 @@ def total_ogv():
356356
def total_ousd():
357357
return make_response(token_stats.total_ousd(), 200)
358358

359+
# do not remove
360+
# used by coinmarketcap.com to calculate total supply and circulating supply of OUSD
361+
@app.route("/total-oeth", methods=["GET"], strict_slashes=False)
362+
@app.route("/<lang_code>/total-oeth", methods=["GET"], strict_slashes=False)
363+
def total_oeth():
364+
return make_response(token_stats.total_oeth(), 200)
365+
359366
# do not remove
360367
# used by coingecko for the circulating supply
361368
@app.route("/circulating-ogn", strict_slashes=False)

0 commit comments

Comments
 (0)