6262 0x0000000000000000000000000000000000000000 ,
6363)
6464XWBTC = Currency (
65- "CONVERSION_xWBTC " ,
65+ "CONVERSION_XWBTC " ,
6666 8 ,
6767 0 ,
6868 0x6a567e68c805323525fe1649adb80b03cddf92c23d2629a6779f54192dffc13 ,
6969 0x0000000000000000000000000000000000000000 ,
7070)
7171XTBTC = Currency (
72- "CONVERSION_xtBTC " ,
72+ "CONVERSION_XTBTC " ,
7373 18 ,
7474 0 ,
7575 0x43a35c1425a0125ef8c171f1a75c6f31ef8648edcc8324b55ce1917db3f9b91 ,
7676 0x0000000000000000000000000000000000000000 ,
7777)
7878XLBTC = Currency (
79- "CONVERSION_xLBTC " ,
79+ "CONVERSION_XLBTC " ,
8080 8 ,
8181 0 ,
8282 0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0 ,
8383 0x0000000000000000000000000000000000000000 ,
8484)
8585XSBTC = Currency (
86- "CONVERSION_xsBTC " ,
86+ "CONVERSION_XSBTC " ,
8787 18 ,
8888 0 ,
8989 0x580f3dc564a7b82f21d40d404b3842d490ae7205e6ac07b1b7af2b4a5183dc9 ,
9090 0x0000000000000000000000000000000000000000 ,
9191)
9292
93+ # New currencies
94+ MRE7BTC = Currency (
95+ "MRE7BTC" ,
96+ 18 ,
97+ 0 ,
98+ 0x0 , # Replace with actual starknet_address if available
99+ 0x0000000000000000000000000000000000000000 ,
100+ )
101+ MRE7YIELD = Currency (
102+ "MRE7YIELD" ,
103+ 18 ,
104+ 0 ,
105+ 0x0 , # Replace with actual starknet_address if available
106+ 0x0000000000000000000000000000000000000000 ,
107+ )
108+ LBTC = Currency (
109+ "LBTC" ,
110+ 8 ,
111+ 0 ,
112+ 0x0 , # Replace with actual starknet_address if available
113+ 0x0000000000000000000000000000000000000000 ,
114+ )
115+ UNIBTC = Currency (
116+ "UNIBTC" ,
117+ 8 ,
118+ 0 ,
119+ 0x0 , # Replace with actual starknet_address if available
120+ 0x0000000000000000000000000000000000000000 ,
121+ )
122+
93123# BTC LST pairs
94124xwbtc_usd_pair = Pair (XWBTC , USD )
95125xtbtc_usd_pair = Pair (XTBTC , USD )
96126xlbtc_usd_pair = Pair (XLBTC , USD )
97127xsbtc_usd_pair = Pair (XSBTC , USD )
98128
129+ # New pairs
130+ mre7btc_usd_pair = Pair (MRE7BTC , USD )
131+ mre7yield_usd_pair = Pair (MRE7YIELD , USD )
132+ lbtc_usd_pair = Pair (LBTC , USD )
133+ unibtc_usd_pair = Pair (UNIBTC , USD )
134+
99135CURRENCIES_TO_ADD = [XWBTC , XTBTC , XLBTC , XSBTC ]
100136
101- PAIRS_TO_ADD = [xwbtc_usd_pair , xtbtc_usd_pair , xlbtc_usd_pair , xsbtc_usd_pair ]
137+ PAIRS_TO_ADD = [
138+ xwbtc_usd_pair ,
139+ xtbtc_usd_pair ,
140+ xlbtc_usd_pair ,
141+ xsbtc_usd_pair ,
142+ ]
102143
103144PAIRS_TO_UPDATE = [
104- # {
105- # "pair_id": "1629317993172502401860",
106- # "pair": ["1629317993172502401860", USD.id, XSTRK.id]
107- # }
145+ {
146+ "pair_id" : 384270964630611589151504336040458606883082949444 ,
147+ "pair" : [384270964630611589151504336040458606883082949444 , XWBTC .id , USD .id ],
148+ },
149+ {
150+ "pair_id" : 384270964630611589151504336040242434100969165636 ,
151+ "pair" : [384270964630611589151504336040242434100969165636 , XTBTC .id , USD .id ],
152+ },
153+ {
154+ "pair_id" : 384270964630611589151504336039665973348665742148 ,
155+ "pair" : [384270964630611589151504336039665973348665742148 , XLBTC .id , USD .id ],
156+ },
108157 # Pair(XSTRK, USD),
109158 # Pair("SSTRK/USD", "SSTRK", "USD"),
110159 # Pair("WSTETH/USD", "WSTETH", "USD"),
@@ -116,16 +165,17 @@ async def main(port: Optional[int]) -> None:
116165 Main function to add currencies and pairs, and update pairs.
117166 """
118167 # Add Currencies
119- for currency in CURRENCIES_TO_ADD :
120- tx_hash = await invoke (
121- "pragma_Oracle" ,
122- "add_currency" ,
123- currency .serialize (),
124- port = port ,
125- )
126- logger .info (f"Added currency { currency } with tx hash { hex (tx_hash )} " )
127-
128- # Update Pairs
168+ # for currency in CURRENCIES_TO_ADD:
169+ # tx_hash = await invoke(
170+ # "pragma_Oracle",
171+ # "add_currency",
172+ # currency.serialize(),
173+ # port=port,
174+ # )
175+ # await asyncio.sleep(1)
176+ # logger.info(f"Added currency {currency} with tx hash {hex(tx_hash)}")
177+
178+ # # Update Pairs
129179 for pair in PAIRS_TO_UPDATE :
130180 tx_hash = await invoke (
131181 "pragma_Oracle" ,
@@ -135,15 +185,25 @@ async def main(port: Optional[int]) -> None:
135185 )
136186 logger .info (f"Updated pair { pair } with tx hash { hex (tx_hash )} " )
137187
138- # Add Pairs
139- for pair in PAIRS_TO_ADD :
140- tx_hash = await invoke (
141- "pragma_Oracle" ,
142- "add_pair" ,
143- pair .serialize (),
144- port = port ,
145- )
146- logger .info (f"Added pair { pair } with tx hash { hex (tx_hash )} " )
188+ # # Add Pairs
189+ # for pair in PAIRS_TO_ADD[2:]:
190+ # tx_hash = await invoke(
191+ # "pragma_Oracle",
192+ # "add_pair",
193+ # (pair.id, pair.quote_currency.id, pair.base_currency.id),
194+ # port=port,
195+ # )
196+ # await asyncio.sleep(1)
197+ # logger.info(f"Added pair {pair} with tx hash {hex(tx_hash)}")
198+
199+ # for pair in PAIRS_TO_ADD:
200+ # tx_hash = await invoke(
201+ # "pragma_Oracle",
202+ # "add_registered_conversion_rate_pair",
203+ # [pair.id],
204+ # port=port,
205+ # )
206+ # logger.info(f"Added conversion rate pair {pair} with tx hash {hex(tx_hash)}")
147207
148208
149209@click .command ()
0 commit comments