prediction-market-agent-tooling 0.69.7.dev1099__py3-none-any.whl → 0.69.7.dev1100__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.
- prediction_market_agent_tooling/tools/contract.py +15 -17
- {prediction_market_agent_tooling-0.69.7.dev1099.dist-info → prediction_market_agent_tooling-0.69.7.dev1100.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.69.7.dev1099.dist-info → prediction_market_agent_tooling-0.69.7.dev1100.dist-info}/RECORD +6 -6
- {prediction_market_agent_tooling-0.69.7.dev1099.dist-info → prediction_market_agent_tooling-0.69.7.dev1100.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.69.7.dev1099.dist-info → prediction_market_agent_tooling-0.69.7.dev1100.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.69.7.dev1099.dist-info → prediction_market_agent_tooling-0.69.7.dev1100.dist-info}/entry_points.txt +0 -0
@@ -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
|
-
|
913
|
-
|
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,28 @@ 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
|
930
|
+
) -> list[ChecksumAddress]:
|
928
931
|
"""
|
929
932
|
There are multiple ways how proxies can be implemented.
|
930
|
-
This function enumerates them and returns the
|
933
|
+
This function enumerates them and returns the ones that succeed, or an empty list.
|
931
934
|
"""
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
address = seer_minimal_proxy_address(contract_address, web3)
|
941
|
-
if address is not None:
|
942
|
-
return address
|
943
|
-
|
944
|
-
return None
|
935
|
+
# It's non-intuitive, but for a single contract, multiple of these can return values.
|
936
|
+
# For example in `test_wrapped_erc1155_init_collateral` test, both minimal_proxy and seer_minimal proxy return an address, but different.
|
937
|
+
addresses = [
|
938
|
+
implementation_proxy_address(contract_address, web3),
|
939
|
+
minimal_proxy_address(contract_address, web3),
|
940
|
+
seer_minimal_proxy_address(contract_address, web3),
|
941
|
+
]
|
942
|
+
return [addr for addr in addresses if addr is not None]
|
945
943
|
|
946
944
|
|
947
945
|
def implementation_proxy_address(
|
@@ -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=
|
94
|
+
prediction_market_agent_tooling/tools/contract.py,sha256=HtMLMJj1Pwz-TD3-a7E_UfAT8NULh6YvTjgc9ujTOb4,33577
|
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.
|
140
|
-
prediction_market_agent_tooling-0.69.7.
|
141
|
-
prediction_market_agent_tooling-0.69.7.
|
142
|
-
prediction_market_agent_tooling-0.69.7.
|
143
|
-
prediction_market_agent_tooling-0.69.7.
|
139
|
+
prediction_market_agent_tooling-0.69.7.dev1100.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
|
140
|
+
prediction_market_agent_tooling-0.69.7.dev1100.dist-info/METADATA,sha256=ezAgg8rF4vSd8IqmWWU0oy11uKj_AVLl-O6U3LWflDY,8876
|
141
|
+
prediction_market_agent_tooling-0.69.7.dev1100.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
142
|
+
prediction_market_agent_tooling-0.69.7.dev1100.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
|
143
|
+
prediction_market_agent_tooling-0.69.7.dev1100.dist-info/RECORD,,
|
File without changes
|
File without changes
|