File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,14 @@ def query_last_metric():
140140# TODO: add logic to sum up balances until all KLIMA tokens are backed
141141
142142carbon_backing_usd = klima_supply * lowest_carbon_price
143- treasury_value -= carbon_backing_usd
143+ total_treasury_value -= ( carbon_backing_usd + treasury_usdc )
144144
145145# TODO: add descriptive tooltips to each label on the pie chart
146146green_ratio_data = [
147147 {"bucket" : "Op Ex" , "value" : total_usdc , "target" : 0.1 },
148148 {"bucket" : "Carbon Forwards" , "value" : total_forwards , "target" : 0.22 },
149149 {"bucket" : "Carbon Backing" , "value" : carbon_backing_usd , "target" : 0.2 },
150- {"bucket" : "Treasury Holdings" , "value" : treasury_value , "target" : 0.48 }
150+ {"bucket" : "Treasury Holdings" , "value" : total_treasury_value , "target" : 0.48 }
151151]
152152green_ratio_df = pd .DataFrame .from_records (green_ratio_data )
153153order = [
Original file line number Diff line number Diff line change 1+ import os
2+
13# Subgraphs
2- KLIMA_PROTOCOL_SUBGRAPH = 'https://api.thegraph.com/subgraphs/name/klimadao/klimadao-protocol-metrics'
4+ GRAPH_API_KEY = os .environ .get ('GRAPH_API_KEY' )
5+ GRAPH_BASE_URL = f'https://gateway-arbitrum.network.thegraph.com/api/{ GRAPH_API_KEY } /subgraphs/id/'
6+ GRAPH_DEV_BASE_URL = 'https://api.studio.thegraph.com/query/71975/'
7+ GRAPH_VERSION_SUFFIX = '/version/latest'
8+
9+ if os .environ .get ('ENV' ) == 'production' :
10+ KLIMA_PROTOCOL_SUBGRAPH = 'https://api.studio.thegraph.com/query/71975/staging-klimadao-protocol-metrics/version/latest'
11+ else :
12+ KLIMA_PROTOCOL_SUBGRAPH = GRAPH_DEV_BASE_URL + 'staging-klimadao-protocol-metrics' + GRAPH_VERSION_SUFFIX
313
414BCT_ERC20_CONTRACT = '0x2f800db0fdb5223b3c3f354886d907a671414a7f'
515NCT_ERC20_CONTRACT = '0xD838290e877E0188a4A44700463419ED96c16107'
You can’t perform that action at this time.
0 commit comments