mezoAgent 0.5.2__tar.gz → 0.5.4__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mezoAgent
3
- Version: 0.5.2
3
+ Version: 0.5.4
4
4
  Summary: A Python package for Mezo Agent transactions with LangChain tools
5
5
  Author: Dreadwulf, Duck, Digi
6
6
  Requires-Dist: python-dotenv
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mezoAgent
3
- Version: 0.5.2
3
+ Version: 0.5.4
4
4
  Summary: A Python package for Mezo Agent transactions with LangChain tools
5
5
  Author: Dreadwulf, Duck, Digi
6
6
  Requires-Dist: python-dotenv
@@ -37,13 +37,17 @@ sender_address = account.address
37
37
  # mUSD Contract Setup using approve/allowance ABI
38
38
  MUSD_ADDRESS = "0x637e22A1EBbca50EA2d34027c238317fD10003eB"
39
39
  ERC20_ABI = json.loads(
40
- '[{"constant": false, "inputs": [{"name": "recipient", "type": "address"}, {"name": "amount", "type": "uint256"}],'
40
+ '[{"constant": true, "inputs": [{"name": "owner", "type": "address"}], '
41
+ '"name": "balanceOf", "outputs": [{"name": "balance", "type": "uint256"}], '
42
+ '"stateMutability": "view", "type": "function"},'
43
+ '{"constant": false, "inputs": [{"name": "recipient", "type": "address"}, {"name": "amount", "type": "uint256"}],'
41
44
  '"name": "transfer", "outputs": [{"name": "", "type": "bool"}], "stateMutability": "nonpayable", "type": "function"},'
42
45
  '{"constant": false, "inputs": [{"name": "spender", "type": "address"}, {"name": "amount", "type": "uint256"}],'
43
46
  '"name": "approve", "outputs": [{"name": "", "type": "bool"}], "stateMutability": "nonpayable", "type": "function"},'
44
47
  '{"constant": true, "inputs": [{"name": "owner", "type": "address"}, {"name": "spender", "type": "address"}],'
45
48
  '"name": "allowance", "outputs": [{"name": "remaining", "type": "uint256"}], "stateMutability": "view", "type": "function"}]'
46
49
  )
50
+
47
51
  musd_contract = web3_instance.eth.contract(address=MUSD_ADDRESS, abi=ERC20_ABI)
48
52
 
49
53
  #Query graph for token info
@@ -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
- return web3_instance.to_checksum_address(token_address)
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)}")
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mezoAgent",
5
- version="0.5.2",
5
+ version="0.5.4",
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  package_data={
File without changes
File without changes
File without changes
File without changes