File size: 786 Bytes
9c400b9
 
da5e53f
6a7abb7
9c400b9
da5e53f
9c400b9
da5e53f
2f3a7c5
da5e53f
 
2f3a7c5
da5e53f
2f3a7c5
da5e53f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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())