File tree 2 files changed +13
-3
lines changed
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():
140
140
# TODO: add logic to sum up balances until all KLIMA tokens are backed
141
141
142
142
carbon_backing_usd = klima_supply * lowest_carbon_price
143
- treasury_value -= carbon_backing_usd
143
+ total_treasury_value -= ( carbon_backing_usd + treasury_usdc )
144
144
145
145
# TODO: add descriptive tooltips to each label on the pie chart
146
146
green_ratio_data = [
147
147
{"bucket" : "Op Ex" , "value" : total_usdc , "target" : 0.1 },
148
148
{"bucket" : "Carbon Forwards" , "value" : total_forwards , "target" : 0.22 },
149
149
{"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 }
151
151
]
152
152
green_ratio_df = pd .DataFrame .from_records (green_ratio_data )
153
153
order = [
Original file line number Diff line number Diff line change
1
+ import os
2
+
1
3
# 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
3
13
4
14
BCT_ERC20_CONTRACT = '0x2f800db0fdb5223b3c3f354886d907a671414a7f'
5
15
NCT_ERC20_CONTRACT = '0xD838290e877E0188a4A44700463419ED96c16107'
You can’t perform that action at this time.
0 commit comments