mezoAgent 0.5.3__tar.gz → 0.5.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {mezoagent-0.5.3 → mezoagent-0.5.4}/PKG-INFO +1 -1
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezoAgent.egg-info/PKG-INFO +1 -1
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/token_balance_tool.py +4 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/utils.py +3 -1
- {mezoagent-0.5.3 → mezoagent-0.5.4}/setup.py +1 -1
- {mezoagent-0.5.3 → mezoagent-0.5.4}/MANIFEST.in +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/README.md +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezoAgent.egg-info/SOURCES.txt +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezoAgent.egg-info/dependency_links.txt +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezoAgent.egg-info/requires.txt +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezoAgent.egg-info/top_level.txt +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/__init__.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/characters.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/chat.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/config.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/data/new_router.json +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/parsing.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/swap_musd_btc.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/mezo_agent/transaction.py +0 -0
- {mezoagent-0.5.3 → mezoagent-0.5.4}/setup.cfg +0 -0
@@ -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")
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|