prediction-market-agent-tooling 0.57.8__py3-none-any.whl → 0.57.9.dev240__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.
@@ -1,7 +1,18 @@
1
1
  [
2
2
  {
3
3
  "type": "constructor",
4
- "inputs": [],
4
+ "inputs": [
5
+ {
6
+ "name": "_treasury",
7
+ "type": "address",
8
+ "internalType": "address payable"
9
+ },
10
+ {
11
+ "name": "_pctToTreasuryInBasisPoints",
12
+ "type": "uint256",
13
+ "internalType": "uint256"
14
+ }
15
+ ],
5
16
  "stateMutability": "nonpayable"
6
17
  },
7
18
  {
@@ -108,6 +119,19 @@
108
119
  ],
109
120
  "stateMutability": "view"
110
121
  },
122
+ {
123
+ "type": "function",
124
+ "name": "pctToTreasuryInBasisPoints",
125
+ "inputs": [],
126
+ "outputs": [
127
+ {
128
+ "name": "",
129
+ "type": "uint256",
130
+ "internalType": "uint256"
131
+ }
132
+ ],
133
+ "stateMutability": "view"
134
+ },
111
135
  {
112
136
  "type": "function",
113
137
  "name": "popNextMessage",
@@ -211,6 +235,19 @@
211
235
  "outputs": [],
212
236
  "stateMutability": "nonpayable"
213
237
  },
238
+ {
239
+ "type": "function",
240
+ "name": "treasury",
241
+ "inputs": [],
242
+ "outputs": [
243
+ {
244
+ "name": "",
245
+ "type": "address",
246
+ "internalType": "address payable"
247
+ }
248
+ ],
249
+ "stateMutability": "view"
250
+ },
214
251
  {
215
252
  "type": "event",
216
253
  "name": "LogMessage",
@@ -20,7 +20,11 @@ from prediction_market_agent_tooling.gtypes import (
20
20
  )
21
21
  from prediction_market_agent_tooling.tools.data_models import MessageContainer
22
22
  from prediction_market_agent_tooling.tools.hexbytes_custom import HexBytes
23
- from prediction_market_agent_tooling.tools.utils import DatetimeUTC, should_not_happen
23
+ from prediction_market_agent_tooling.tools.utils import (
24
+ BPS_CONSTANT,
25
+ DatetimeUTC,
26
+ should_not_happen,
27
+ )
24
28
  from prediction_market_agent_tooling.tools.web3_utils import (
25
29
  call_function_on_contract,
26
30
  send_function_on_contract_tx,
@@ -66,9 +70,7 @@ class ContractBaseClass(BaseModel):
66
70
  address: ChecksumAddress
67
71
 
68
72
  _abi_field_validator = field_validator("abi", mode="before")(abi_field_validator)
69
- _cache: dict[
70
- str, t.Any
71
- ] = (
73
+ _cache: dict[str, t.Any] = (
72
74
  {}
73
75
  ) # Can be used to hold values that aren't going to change after getting them for the first time, as for example `symbol` of an ERC-20 token.
74
76
 
@@ -545,9 +547,13 @@ class AgentCommunicationContract(ContractOnGnosisChain):
545
547
  )
546
548
 
547
549
  address: ChecksumAddress = Web3.to_checksum_address(
548
- "0x62872578920427ae24b2527697dAb90CD1F4CA45"
550
+ "0xd422e0059ed819e8d792af936da206878188e34f"
549
551
  )
550
552
 
553
+ def ratio_given_to_treasury(self, web3: Web3 | None = None) -> float:
554
+ bps: int = self.call("pctToTreasuryInBasisPoints", web3=web3)
555
+ return bps / BPS_CONSTANT
556
+
551
557
  def count_unseen_messages(
552
558
  self,
553
559
  agent_address: ChecksumAddress,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.57.8
3
+ Version: 0.57.9.dev240
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.12
@@ -1,4 +1,4 @@
1
- prediction_market_agent_tooling/abis/agentcommunication.abi.json,sha256=mNF-20obU-ntbNSybQNd1ozVV6Joc1chq97vmsgbPCo,8707
1
+ prediction_market_agent_tooling/abis/agentcommunication.abi.json,sha256=rTYxzN-veBbBJ-M2JL--7dRQSS6yWRhiQ1lGvWe_Wrg,9781
2
2
  prediction_market_agent_tooling/abis/debuggingcontract.abi.json,sha256=KdkCWmif_WO421RFKhc03kGJiccFqsxsZNrgCd8EH_4,571
3
3
  prediction_market_agent_tooling/abis/depositablewrapper_erc20.abi.json,sha256=m0Wk3uQyLM8apWRRvX4d3u1d77bWVuXfV38D-aV48t0,4612
4
4
  prediction_market_agent_tooling/abis/erc20.abi.json,sha256=b8t6tPUhjBo5dHFq8ipsK-ih_g29dOTbWI0GBZiEWL8,3685
@@ -77,7 +77,7 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci
77
77
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=aafau_n_AUbLIwkyIRiTPgKB0dmM0767mSqyPDLF2A4,10576
78
78
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
79
79
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=upSXN5__rmRlzJ6tv1h7FodKzJu9eCkFrN_zeuwroJM,2151
80
- prediction_market_agent_tooling/tools/contract.py,sha256=qRGpr--1FVObPVzXTKV3DpHCqwUAuTt5UmiyGyfhMbg,25796
80
+ prediction_market_agent_tooling/tools/contract.py,sha256=sELcL5la6oWMWUsCC4BZHwQ5rM-wqekdryPMrV7PPx4,25992
81
81
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
82
82
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
83
83
  prediction_market_agent_tooling/tools/data_models.py,sha256=jDQ7FU0QQhXlcgJh5VZZGwDTYP2OPAqKPHZFewCPAUY,732
@@ -106,8 +106,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYT
106
106
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
107
107
  prediction_market_agent_tooling/tools/utils.py,sha256=WvuUCHgMCiMq8_wMm5PHNwvLhcdDk2zGKaAM8OUC-qY,6438
108
108
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=wqUDCed3iNrn1Wao1iwGN6tzIrhpzrTRj319wlveJEo,12275
109
- prediction_market_agent_tooling-0.57.8.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
110
- prediction_market_agent_tooling-0.57.8.dist-info/METADATA,sha256=Gr3x1leFpFFxK-NiQuvm2_NeZAB8zKNUwfmXP_LUNY8,8188
111
- prediction_market_agent_tooling-0.57.8.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
112
- prediction_market_agent_tooling-0.57.8.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
113
- prediction_market_agent_tooling-0.57.8.dist-info/RECORD,,
109
+ prediction_market_agent_tooling-0.57.9.dev240.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
110
+ prediction_market_agent_tooling-0.57.9.dev240.dist-info/METADATA,sha256=-N0tlQUbzrxrWO6KfpUMH35D87ugFWaJILQJgEXtf3s,8195
111
+ prediction_market_agent_tooling-0.57.9.dev240.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
112
+ prediction_market_agent_tooling-0.57.9.dev240.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
113
+ prediction_market_agent_tooling-0.57.9.dev240.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.0.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any