| import json | |
| import pprint | |
| import httpx | |
| import asyncio | |
| # # import src.knowledge_bases.pipeline as Pipeline | |
| # # asyncio.run(Pipeline.main()) | |
| # from src.data_sources.coin_gecko import CoinGecko | |
| # from src.data_sources.cryptocompare import CryptoCompare | |
| # cgc = CoinGecko() | |
| # pprint.pprint(cgc.get_trending_coin_list()) | |
| from src.libs.rpc_client import rpc_call | |
| # response = rpc_call(method_name="getSwapSources") | |
| async def main(): | |
| method_name = 'getSwapSources' | |
| try: | |
| response = await rpc_call(method_name) | |
| if response is not None: | |
| print("RPC call successful!") | |
| print(response) | |
| else: | |
| print("RPC call failed.") | |
| except httpx.RequestError as e: | |
| print(f"Error in main function: {e}") | |
| asyncio.run(main()) | |