prediction-market-agent-tooling 0.57.13.dev264__py3-none-any.whl → 0.57.14__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.
@@ -15,29 +15,17 @@
15
15
  "stateMutability": "nonpayable",
16
16
  "type": "constructor"
17
17
  },
18
- {
19
- "inputs": [],
20
- "name": "MessageNotSentByAgent",
21
- "type": "error"
22
- },
18
+ { "inputs": [], "name": "MessageNotSentByAgent", "type": "error" },
23
19
  {
24
20
  "inputs": [
25
- {
26
- "internalType": "address",
27
- "name": "owner",
28
- "type": "address"
29
- }
21
+ { "internalType": "address", "name": "owner", "type": "address" }
30
22
  ],
31
23
  "name": "OwnableInvalidOwner",
32
24
  "type": "error"
33
25
  },
34
26
  {
35
27
  "inputs": [
36
- {
37
- "internalType": "address",
38
- "name": "account",
39
- "type": "address"
40
- }
28
+ { "internalType": "address", "name": "account", "type": "address" }
41
29
  ],
42
30
  "name": "OwnableUnauthorizedAccount",
43
31
  "type": "error"
@@ -94,11 +82,7 @@
94
82
  },
95
83
  {
96
84
  "inputs": [
97
- {
98
- "internalType": "uint256",
99
- "name": "newValue",
100
- "type": "uint256"
101
- }
85
+ { "internalType": "uint256", "name": "newValue", "type": "uint256" }
102
86
  ],
103
87
  "name": "adjustMinimumValueForSendingMessage",
104
88
  "outputs": [],
@@ -107,60 +91,26 @@
107
91
  },
108
92
  {
109
93
  "inputs": [
110
- {
111
- "internalType": "address",
112
- "name": "agentAddress",
113
- "type": "address"
114
- }
94
+ { "internalType": "address", "name": "agentAddress", "type": "address" }
115
95
  ],
116
96
  "name": "countMessages",
117
- "outputs": [
118
- {
119
- "internalType": "uint256",
120
- "name": "",
121
- "type": "uint256"
122
- }
123
- ],
97
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
124
98
  "stateMutability": "view",
125
99
  "type": "function"
126
100
  },
127
101
  {
128
102
  "inputs": [
129
- {
130
- "internalType": "address",
131
- "name": "agentAddress",
132
- "type": "address"
133
- },
134
- {
135
- "internalType": "uint256",
136
- "name": "idx",
137
- "type": "uint256"
138
- }
103
+ { "internalType": "address", "name": "agentAddress", "type": "address" },
104
+ { "internalType": "uint256", "name": "idx", "type": "uint256" }
139
105
  ],
140
106
  "name": "getAtIndex",
141
107
  "outputs": [
142
108
  {
143
109
  "components": [
144
- {
145
- "internalType": "address",
146
- "name": "sender",
147
- "type": "address"
148
- },
149
- {
150
- "internalType": "address",
151
- "name": "recipient",
152
- "type": "address"
153
- },
154
- {
155
- "internalType": "bytes",
156
- "name": "message",
157
- "type": "bytes"
158
- },
159
- {
160
- "internalType": "uint256",
161
- "name": "value",
162
- "type": "uint256"
163
- }
110
+ { "internalType": "address", "name": "sender", "type": "address" },
111
+ { "internalType": "address", "name": "recipient", "type": "address" },
112
+ { "internalType": "bytes", "name": "message", "type": "bytes" },
113
+ { "internalType": "uint256", "name": "value", "type": "uint256" }
164
114
  ],
165
115
  "internalType": "struct DoubleEndedStructQueue.MessageContainer",
166
116
  "name": "",
@@ -173,74 +123,37 @@
173
123
  {
174
124
  "inputs": [],
175
125
  "name": "minimumValueForSendingMessageInWei",
176
- "outputs": [
177
- {
178
- "internalType": "uint256",
179
- "name": "",
180
- "type": "uint256"
181
- }
182
- ],
126
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
183
127
  "stateMutability": "view",
184
128
  "type": "function"
185
129
  },
186
130
  {
187
131
  "inputs": [],
188
132
  "name": "owner",
189
- "outputs": [
190
- {
191
- "internalType": "address",
192
- "name": "",
193
- "type": "address"
194
- }
195
- ],
133
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
196
134
  "stateMutability": "view",
197
135
  "type": "function"
198
136
  },
199
137
  {
200
138
  "inputs": [],
201
139
  "name": "pctToTreasuryInBasisPoints",
202
- "outputs": [
203
- {
204
- "internalType": "uint256",
205
- "name": "",
206
- "type": "uint256"
207
- }
208
- ],
140
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
209
141
  "stateMutability": "view",
210
142
  "type": "function"
211
143
  },
212
144
  {
213
145
  "inputs": [
214
- {
215
- "internalType": "address",
216
- "name": "agentAddress",
217
- "type": "address"
218
- }
146
+ { "internalType": "address", "name": "agentAddress", "type": "address" },
147
+ { "internalType": "uint256", "name": "idx", "type": "uint256" }
219
148
  ],
220
- "name": "popNextMessage",
149
+ "name": "popMessageAtIndex",
221
150
  "outputs": [
222
151
  {
223
152
  "components": [
224
- {
225
- "internalType": "address",
226
- "name": "sender",
227
- "type": "address"
228
- },
229
- {
230
- "internalType": "address",
231
- "name": "recipient",
232
- "type": "address"
233
- },
234
- {
235
- "internalType": "bytes",
236
- "name": "message",
237
- "type": "bytes"
238
- },
239
- {
240
- "internalType": "uint256",
241
- "name": "value",
242
- "type": "uint256"
243
- }
153
+ { "internalType": "address", "name": "sender", "type": "address" },
154
+ { "internalType": "address", "name": "recipient", "type": "address" },
155
+ { "internalType": "bytes", "name": "message", "type": "bytes" },
156
+ { "internalType": "uint256", "name": "value", "type": "uint256" }
244
157
  ],
245
158
  "internalType": "struct DoubleEndedStructQueue.MessageContainer",
246
159
  "name": "",
@@ -251,25 +164,11 @@
251
164
  "type": "function"
252
165
  },
253
166
  {
254
- "inputs": [
255
- {
256
- "internalType": "address",
257
- "name": "",
258
- "type": "address"
259
- }
260
- ],
167
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
261
168
  "name": "queues",
262
169
  "outputs": [
263
- {
264
- "internalType": "uint128",
265
- "name": "_begin",
266
- "type": "uint128"
267
- },
268
- {
269
- "internalType": "uint128",
270
- "name": "_end",
271
- "type": "uint128"
272
- }
170
+ { "internalType": "uint128", "name": "_begin", "type": "uint128" },
171
+ { "internalType": "uint128", "name": "_end", "type": "uint128" }
273
172
  ],
274
173
  "stateMutability": "view",
275
174
  "type": "function"
@@ -283,16 +182,8 @@
283
182
  },
284
183
  {
285
184
  "inputs": [
286
- {
287
- "internalType": "address",
288
- "name": "agentAddress",
289
- "type": "address"
290
- },
291
- {
292
- "internalType": "bytes",
293
- "name": "message",
294
- "type": "bytes"
295
- }
185
+ { "internalType": "address", "name": "agentAddress", "type": "address" },
186
+ { "internalType": "bytes", "name": "message", "type": "bytes" }
296
187
  ],
297
188
  "name": "sendMessage",
298
189
  "outputs": [],
@@ -314,11 +205,7 @@
314
205
  },
315
206
  {
316
207
  "inputs": [
317
- {
318
- "internalType": "address",
319
- "name": "newOwner",
320
- "type": "address"
321
- }
208
+ { "internalType": "address", "name": "newOwner", "type": "address" }
322
209
  ],
323
210
  "name": "transferOwnership",
324
211
  "outputs": [],
@@ -329,13 +216,9 @@
329
216
  "inputs": [],
330
217
  "name": "treasury",
331
218
  "outputs": [
332
- {
333
- "internalType": "address payable",
334
- "name": "",
335
- "type": "address"
336
- }
219
+ { "internalType": "address payable", "name": "", "type": "address" }
337
220
  ],
338
221
  "stateMutability": "view",
339
222
  "type": "function"
340
223
  }
341
- ]
224
+ ]
@@ -46,13 +46,13 @@ def claim_bonds_on_realitio_questions(
46
46
  claim_bonds_on_realitio_question(
47
47
  api_keys, question, auto_withdraw=auto_withdraw, web3=web3
48
48
  )
49
+ claimed_questions.append(question.questionId)
49
50
  except Exception as e:
50
51
  if not skip_failed:
51
52
  raise e
52
53
  logger.error(
53
54
  f"Failed to claim bond for {question.url=}, {question.questionId=}: {e}"
54
55
  )
55
- claimed_questions.append(question.questionId)
56
56
 
57
57
  return claimed_questions
58
58
 
@@ -629,7 +629,7 @@ class AgentCommunicationContract(ContractOnGnosisChain, OwnableContract):
629
629
  )
630
630
 
631
631
  address: ChecksumAddress = Web3.to_checksum_address(
632
- "0xc566Cb829Ed7aC097D17a38011A40Ad2DC25Dd82"
632
+ "0xe9dd78FF297DbaAbe5D0E45aE554a4B561935DE9"
633
633
  )
634
634
 
635
635
  def minimum_message_value(self, web3: Web3 | None = None) -> xDai:
@@ -691,28 +691,29 @@ class AgentCommunicationContract(ContractOnGnosisChain, OwnableContract):
691
691
  self,
692
692
  api_keys: APIKeys,
693
693
  agent_address: ChecksumAddress,
694
+ index: int = 0,
694
695
  web3: Web3 | None = None,
695
696
  ) -> MessageContainer:
696
697
  """
697
- Retrieves and removes the first message from the agent's message queue.
698
+ Retrieves and removes message at specified index from the agent's message queue.
698
699
 
699
700
  This method first retrieves the message at the front of the queue without removing it,
700
701
  allowing us to return the message content directly. The actual removal of the message
701
702
  from the queue is performed by sending a transaction to the contract, which executes
702
- the `popNextMessage` function. The transaction receipt is not used to obtain the message
703
+ the `popMessageAtIndex` function. The transaction receipt is not used to obtain the message
703
704
  content, as it only contains event data, not the returned struct.
704
705
  """
705
706
 
706
- # Peek first element before popping.
707
+ # Peek the element before popping.
707
708
  message_container = self.get_at_index(
708
- agent_address=agent_address, idx=0, web3=web3
709
+ agent_address=agent_address, idx=index, web3=web3
709
710
  )
710
711
 
711
712
  # Next, pop that element and discard the transaction receipt.
712
713
  self.send(
713
714
  api_keys=api_keys,
714
- function_name="popNextMessage",
715
- function_params=[agent_address],
715
+ function_name="popMessageAtIndex",
716
+ function_params=[agent_address, index],
716
717
  web3=web3,
717
718
  )
718
719
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.57.13.dev264
3
+ Version: 0.57.14
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -1,4 +1,4 @@
1
- prediction_market_agent_tooling/abis/agentcommunication.abi.json,sha256=RdxYEUbcXAdfeLaAikrx2FdSjuPi0iKLiZtkJRrksaM,6724
1
+ prediction_market_agent_tooling/abis/agentcommunication.abi.json,sha256=Go6blKVORPuViDkxw_vqFzcpRH5i2qHje9R1wILDqM8,5817
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
@@ -53,7 +53,7 @@ prediction_market_agent_tooling/markets/omen/__init__.py,sha256=47DEQpj8HBSa-_TI
53
53
  prediction_market_agent_tooling/markets/omen/data_models.py,sha256=javEACWZL-9y-BaFpyXu-Rl0tQJxMlOWu_vZ89nqK8w,28387
54
54
  prediction_market_agent_tooling/markets/omen/omen.py,sha256=XU0A-Uj4FAYY2a_o5Gq2_PtmowxoVvwCY5BDVdcyIjk,51852
55
55
  prediction_market_agent_tooling/markets/omen/omen_contracts.py,sha256=baXJwk-jSI3-FV-k239oCNOA4oKz6LT47juX8AKpW3A,28297
56
- prediction_market_agent_tooling/markets/omen/omen_resolving.py,sha256=Btdtzfzf49InW7IVqQbcbTZe9YFsOtZ_4huU3KINkZA,9699
56
+ prediction_market_agent_tooling/markets/omen/omen_resolving.py,sha256=TTi-HP_fUHKH5YTlWSBdszQFb5q3pfzXnXr1FsFu3bM,9703
57
57
  prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py,sha256=mZ0CgKfHj0gLFq9plNpBhNqMuclb8V3qNagWfLYcpUc,38806
58
58
  prediction_market_agent_tooling/markets/polymarket/api.py,sha256=UZ4_TG8ceb9Y-qgsOKs8Qiv8zDt957QkT8IX2c83yqo,4800
59
59
  prediction_market_agent_tooling/markets/polymarket/data_models.py,sha256=Fd5PI5y3mJM8VHExBhWFWEnuuIKxQmIAXgBuoPDvNjw,4341
@@ -80,7 +80,7 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci
80
80
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=aafau_n_AUbLIwkyIRiTPgKB0dmM0767mSqyPDLF2A4,10576
81
81
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
82
82
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp2q0sv27j4al_M_Tj9aR2JJP-xNHQXA,2151
83
- prediction_market_agent_tooling/tools/contract.py,sha256=aNWfNlbo-5hrgWm-uyhtK0d6p4H2ktM_7MzyzeicCeY,29560
83
+ prediction_market_agent_tooling/tools/contract.py,sha256=VKSH-31Cf3DwtHpH9KZnQr08IxmfyvYvuqkcOK7dUN8,29608
84
84
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
85
85
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
86
86
  prediction_market_agent_tooling/tools/data_models.py,sha256=jDQ7FU0QQhXlcgJh5VZZGwDTYP2OPAqKPHZFewCPAUY,732
@@ -109,8 +109,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYT
109
109
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
110
110
  prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
111
111
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=wqUDCed3iNrn1Wao1iwGN6tzIrhpzrTRj319wlveJEo,12275
112
- prediction_market_agent_tooling-0.57.13.dev264.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
113
- prediction_market_agent_tooling-0.57.13.dev264.dist-info/METADATA,sha256=k9N_n6Q795B8MklHoi4g6XR6KL7f86S0Jo61gmQxSK8,8247
114
- prediction_market_agent_tooling-0.57.13.dev264.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
115
- prediction_market_agent_tooling-0.57.13.dev264.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
116
- prediction_market_agent_tooling-0.57.13.dev264.dist-info/RECORD,,
112
+ prediction_market_agent_tooling-0.57.14.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
113
+ prediction_market_agent_tooling-0.57.14.dist-info/METADATA,sha256=wU7aXISo2V_yOhVD8zgDVSroQOrc74tz0-5uvegHnQU,8240
114
+ prediction_market_agent_tooling-0.57.14.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
115
+ prediction_market_agent_tooling-0.57.14.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
116
+ prediction_market_agent_tooling-0.57.14.dist-info/RECORD,,