prediction-market-agent-tooling 0.69.7.dev1099__py3-none-any.whl → 0.69.7.dev1101__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.
@@ -909,8 +909,8 @@ def contract_implements_function(
909
909
 
910
910
  # If not found directly and we should check proxies
911
911
  if not implements and look_for_proxy_contract:
912
- imp_address = uni_implementation_address(contract_address, web3)
913
- if imp_address is not None:
912
+ imp_addresses = uni_implementation_address(contract_address, web3)
913
+ for imp_address in imp_addresses:
914
914
  implements = contract_implements_function(
915
915
  imp_address,
916
916
  function_name=function_name,
@@ -918,30 +918,30 @@ def contract_implements_function(
918
918
  function_arg_types=function_arg_types,
919
919
  look_for_proxy_contract=False,
920
920
  )
921
+ # If one of the implementations has the function, we can terminate early.
922
+ if implements:
923
+ break
921
924
 
922
925
  return implements
923
926
 
924
927
 
925
928
  def uni_implementation_address(
926
929
  contract_address: ChecksumAddress, web3: Web3
927
- ) -> ChecksumAddress | None:
930
+ ) -> list[ChecksumAddress]:
928
931
  """
929
932
  There are multiple ways how proxies can be implemented.
930
- This function enumerates them and returns the one that succeeds, or None.
933
+ This function enumerates them and returns the ones that succeed, or an empty list.
931
934
  """
932
- address = implementation_proxy_address(contract_address, web3)
933
- if address is not None:
934
- return address
935
-
936
- address = minimal_proxy_address(contract_address, web3)
937
- if address is not None:
938
- return address
939
-
940
- address = seer_minimal_proxy_address(contract_address, web3)
941
- if address is not None:
942
- return address
943
-
944
- return None
935
+ # Currently, our implementation sometimes returns implementation multiple addresses for a single proxy contract.
936
+ # This should not happen and needs more investigation.
937
+ # Probably `minimal_proxy_address` is bugged and a function identifying the ERC-1967 proxy pattern (https://eips.ethereum.org/EIPS/eip-1967#logic-contract-address) should be implemented.
938
+ # TODO: Fix the above, and afterwards assert that only 1 imp address is returned from this function. Or prove that this could indeed happen (although we are very pretty sure it shouldn't).
939
+ addresses = [
940
+ implementation_proxy_address(contract_address, web3),
941
+ minimal_proxy_address(contract_address, web3),
942
+ seer_minimal_proxy_address(contract_address, web3),
943
+ ]
944
+ return [addr for addr in addresses if addr is not None]
945
945
 
946
946
 
947
947
  def implementation_proxy_address(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.69.7.dev1099
3
+ Version: 0.69.7.dev1101
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -91,7 +91,7 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=MpS3FOM
91
91
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=rZIGhgijquwwPtp_qncSAPR1SDF2XxIVZL1ir0fgzWw,12127
92
92
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
93
93
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp2q0sv27j4al_M_Tj9aR2JJP-xNHQXA,2151
94
- prediction_market_agent_tooling/tools/contract.py,sha256=C4RCqnuCq5xn8ArlWMoM9FDBWE4ds5hv2uD7aieD5JU,33297
94
+ prediction_market_agent_tooling/tools/contract.py,sha256=BzpAFcbKl_KqwgAlaXx63Fg8jzr0EO3qEeOs1K11CPA,33905
95
95
  prediction_market_agent_tooling/tools/contract_utils.py,sha256=9X9raICUZkPDShilt02aYzS_ILZ62u0vG5081uWLdqk,2152
96
96
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
97
97
  prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=kdvhWVTb31oHVspQFowDNEIoDtx8hwGTlKsWYGRh3oQ,14050
@@ -136,8 +136,8 @@ prediction_market_agent_tooling/tools/tokens/usd.py,sha256=DPO-4HBTy1-TZHKL_9CnH
136
136
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
137
137
  prediction_market_agent_tooling/tools/utils.py,sha256=ruq6P5TFs8CBHxeBLj1Plpx7kuNFPpDgMsJGQgDiRNs,8785
138
138
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=CDbaidlLeQ4VHzSg150L7QNfHfGveljSePGuDVFEYqc,13963
139
- prediction_market_agent_tooling-0.69.7.dev1099.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
140
- prediction_market_agent_tooling-0.69.7.dev1099.dist-info/METADATA,sha256=81AFsfHQIqvlZNFnzDidqLRskL6Sc1LEemEOZQjwViI,8876
141
- prediction_market_agent_tooling-0.69.7.dev1099.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
142
- prediction_market_agent_tooling-0.69.7.dev1099.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
143
- prediction_market_agent_tooling-0.69.7.dev1099.dist-info/RECORD,,
139
+ prediction_market_agent_tooling-0.69.7.dev1101.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
140
+ prediction_market_agent_tooling-0.69.7.dev1101.dist-info/METADATA,sha256=uz-9NxWSMfKcS19OtFZ_uZtLzsHw1KZYmecW4U8HJm0,8876
141
+ prediction_market_agent_tooling-0.69.7.dev1101.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
142
+ prediction_market_agent_tooling-0.69.7.dev1101.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
143
+ prediction_market_agent_tooling-0.69.7.dev1101.dist-info/RECORD,,