mezoAgent 0.5.3__py3-none-any.whl → 0.5.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mezoAgent-0.5.3.dist-info → mezoAgent-0.5.4.dist-info}/METADATA +1 -1
- {mezoAgent-0.5.3.dist-info → mezoAgent-0.5.4.dist-info}/RECORD +6 -6
- mezo_agent/token_balance_tool.py +4 -0
- mezo_agent/utils.py +3 -1
- {mezoAgent-0.5.3.dist-info → mezoAgent-0.5.4.dist-info}/WHEEL +0 -0
- {mezoAgent-0.5.3.dist-info → mezoAgent-0.5.4.dist-info}/top_level.txt +0 -0
@@ -4,11 +4,11 @@ mezo_agent/chat.py,sha256=ZtNurUDV7UzJjbFyU96DNGy37hO3gl0osn19mRu7ER8,859
|
|
4
4
|
mezo_agent/config.py,sha256=6xFgk80eiBLTasKGW73Ne8hNhMtx8BbQ_Ef79YOyDlc,3233
|
5
5
|
mezo_agent/parsing.py,sha256=v5AiLfZ8Rvm46gek7QX2OmeLFO8xhvQOH_yCc6GNlLA,3850
|
6
6
|
mezo_agent/swap_musd_btc.py,sha256=Co-XcfK73spm94VC6qzGY0VYoGwsMDKKHM8ToGh2JxU,4289
|
7
|
-
mezo_agent/token_balance_tool.py,sha256=
|
7
|
+
mezo_agent/token_balance_tool.py,sha256=OvdpEr3Vy_LU1-dg2hOt4IJR6B8Rmql_NQCuVy3cqqg,1459
|
8
8
|
mezo_agent/transaction.py,sha256=YpfWrkEaf0YGM_Kc4cFwlT9GmBGZkeJHWm0VGHs9Gks,4199
|
9
|
-
mezo_agent/utils.py,sha256=
|
9
|
+
mezo_agent/utils.py,sha256=SnVRjAdrluqiiTjPNi0VhMKGGRvmYZlPXE5B4Bknq8c,1106
|
10
10
|
mezo_agent/data/new_router.json,sha256=A8U-NVfe1F-hDyR90_SuH8jDAxmzyyHWdJW62j9TZsc,26756
|
11
|
-
mezoAgent-0.5.
|
12
|
-
mezoAgent-0.5.
|
13
|
-
mezoAgent-0.5.
|
14
|
-
mezoAgent-0.5.
|
11
|
+
mezoAgent-0.5.4.dist-info/METADATA,sha256=djvkoN-W3_Gl04MEOu62OXfP9hxExBwA4SadY8iKkeQ,273
|
12
|
+
mezoAgent-0.5.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
13
|
+
mezoAgent-0.5.4.dist-info/top_level.txt,sha256=rrAci_NyTR9z6w_BrQhQrAhzMW_A0NYhVa0x2USl0nQ,11
|
14
|
+
mezoAgent-0.5.4.dist-info/RECORD,,
|
mezo_agent/token_balance_tool.py
CHANGED
@@ -23,8 +23,12 @@ def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
|
23
23
|
try:
|
24
24
|
# Get the contract address dynamically
|
25
25
|
token_address = get_token_address_by_symbol(token_symbol)
|
26
|
+
print(f"✅ Using token address: {token_address}") # Debugging
|
27
|
+
print(f"✅ Using ABI: {ERC20_ABI}")
|
28
|
+
|
26
29
|
token_contract = web3_instance.eth.contract(address=token_address, abi=ERC20_ABI)
|
27
30
|
|
31
|
+
|
28
32
|
# Fetch balance
|
29
33
|
balance_wei = token_contract.functions.balanceOf(sender_address).call()
|
30
34
|
balance = web3_instance.from_wei(balance_wei, "ether")
|
mezo_agent/utils.py
CHANGED
@@ -23,7 +23,9 @@ def get_token_address_by_symbol(symbol: str) -> str:
|
|
23
23
|
|
24
24
|
if matching_tokens:
|
25
25
|
token_address = matching_tokens[0]["id"]
|
26
|
-
|
26
|
+
checksum_address = web3_instance.to_checksum_address(token_address)
|
27
|
+
print(f"✅ Token {symbol} found at address: {checksum_address}") # Debugging
|
28
|
+
return checksum_address
|
27
29
|
else:
|
28
30
|
available_symbols = [t["symbol"] for t in tokens]
|
29
31
|
raise Exception(f"Token '{symbol}' not found. Available: {', '.join(available_symbols)}")
|
File without changes
|
File without changes
|