prediction-market-agent-tooling 0.43.1__py3-none-any.whl → 0.43.4__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/abis/depositablewrapper_erc20.abi.json +279 -0
- prediction_market_agent_tooling/abis/erc20.abi.json +221 -314
- prediction_market_agent_tooling/abis/erc4626.abi.json +623 -0
- prediction_market_agent_tooling/abis/proxy.abi.json +24 -0
- prediction_market_agent_tooling/deploy/agent.py +10 -2
- prediction_market_agent_tooling/deploy/agent_example.py +4 -1
- prediction_market_agent_tooling/gtypes.py +1 -1
- prediction_market_agent_tooling/markets/agent_market.py +2 -1
- prediction_market_agent_tooling/markets/manifold/manifold.py +3 -2
- prediction_market_agent_tooling/markets/omen/data_models.py +2 -1
- prediction_market_agent_tooling/markets/omen/omen.py +73 -38
- prediction_market_agent_tooling/markets/omen/omen_contracts.py +43 -12
- prediction_market_agent_tooling/markets/omen/omen_resolving.py +17 -6
- prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py +9 -0
- prediction_market_agent_tooling/markets/polymarket/data_models_web.py +83 -83
- prediction_market_agent_tooling/markets/polymarket/polymarket.py +2 -1
- prediction_market_agent_tooling/tools/contract.py +303 -11
- prediction_market_agent_tooling/tools/is_predictable.py +4 -2
- {prediction_market_agent_tooling-0.43.1.dist-info → prediction_market_agent_tooling-0.43.4.dist-info}/METADATA +1 -1
- {prediction_market_agent_tooling-0.43.1.dist-info → prediction_market_agent_tooling-0.43.4.dist-info}/RECORD +23 -21
- prediction_market_agent_tooling/abis/wxdai.abi.json +0 -279
- {prediction_market_agent_tooling-0.43.1.dist-info → prediction_market_agent_tooling-0.43.4.dist-info}/LICENSE +0 -0
- {prediction_market_agent_tooling-0.43.1.dist-info → prediction_market_agent_tooling-0.43.4.dist-info}/WHEEL +0 -0
- {prediction_market_agent_tooling-0.43.1.dist-info → prediction_market_agent_tooling-0.43.4.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,623 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"inputs": [
|
4
|
+
{ "internalType": "string", "name": "_name", "type": "string" },
|
5
|
+
{ "internalType": "string", "name": "_ticker", "type": "string" }
|
6
|
+
],
|
7
|
+
"stateMutability": "nonpayable",
|
8
|
+
"type": "constructor"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"inputs": [
|
12
|
+
{ "internalType": "address", "name": "target", "type": "address" }
|
13
|
+
],
|
14
|
+
"name": "AddressEmptyCode",
|
15
|
+
"type": "error"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"inputs": [
|
19
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
20
|
+
],
|
21
|
+
"name": "AddressInsufficientBalance",
|
22
|
+
"type": "error"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"inputs": [
|
26
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
27
|
+
{
|
28
|
+
"internalType": "uint256",
|
29
|
+
"name": "currentAllowance",
|
30
|
+
"type": "uint256"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"internalType": "uint256",
|
34
|
+
"name": "requestedDecrease",
|
35
|
+
"type": "uint256"
|
36
|
+
}
|
37
|
+
],
|
38
|
+
"name": "ERC20FailedDecreaseAllowance",
|
39
|
+
"type": "error"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"inputs": [
|
43
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
44
|
+
{ "internalType": "uint256", "name": "allowance", "type": "uint256" },
|
45
|
+
{ "internalType": "uint256", "name": "needed", "type": "uint256" }
|
46
|
+
],
|
47
|
+
"name": "ERC20InsufficientAllowance",
|
48
|
+
"type": "error"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"inputs": [
|
52
|
+
{ "internalType": "address", "name": "sender", "type": "address" },
|
53
|
+
{ "internalType": "uint256", "name": "balance", "type": "uint256" },
|
54
|
+
{ "internalType": "uint256", "name": "needed", "type": "uint256" }
|
55
|
+
],
|
56
|
+
"name": "ERC20InsufficientBalance",
|
57
|
+
"type": "error"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"inputs": [
|
61
|
+
{ "internalType": "address", "name": "approver", "type": "address" }
|
62
|
+
],
|
63
|
+
"name": "ERC20InvalidApprover",
|
64
|
+
"type": "error"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"inputs": [
|
68
|
+
{ "internalType": "address", "name": "receiver", "type": "address" }
|
69
|
+
],
|
70
|
+
"name": "ERC20InvalidReceiver",
|
71
|
+
"type": "error"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"inputs": [
|
75
|
+
{ "internalType": "address", "name": "sender", "type": "address" }
|
76
|
+
],
|
77
|
+
"name": "ERC20InvalidSender",
|
78
|
+
"type": "error"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"inputs": [
|
82
|
+
{ "internalType": "address", "name": "spender", "type": "address" }
|
83
|
+
],
|
84
|
+
"name": "ERC20InvalidSpender",
|
85
|
+
"type": "error"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"inputs": [
|
89
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" }
|
90
|
+
],
|
91
|
+
"name": "ERC2612ExpiredSignature",
|
92
|
+
"type": "error"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"inputs": [
|
96
|
+
{ "internalType": "address", "name": "signer", "type": "address" },
|
97
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
98
|
+
],
|
99
|
+
"name": "ERC2612InvalidSigner",
|
100
|
+
"type": "error"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"inputs": [
|
104
|
+
{ "internalType": "address", "name": "receiver", "type": "address" },
|
105
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" },
|
106
|
+
{ "internalType": "uint256", "name": "max", "type": "uint256" }
|
107
|
+
],
|
108
|
+
"name": "ERC4626ExceededMaxDeposit",
|
109
|
+
"type": "error"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"inputs": [
|
113
|
+
{ "internalType": "address", "name": "receiver", "type": "address" },
|
114
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" },
|
115
|
+
{ "internalType": "uint256", "name": "max", "type": "uint256" }
|
116
|
+
],
|
117
|
+
"name": "ERC4626ExceededMaxMint",
|
118
|
+
"type": "error"
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"inputs": [
|
122
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
123
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" },
|
124
|
+
{ "internalType": "uint256", "name": "max", "type": "uint256" }
|
125
|
+
],
|
126
|
+
"name": "ERC4626ExceededMaxRedeem",
|
127
|
+
"type": "error"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"inputs": [
|
131
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
132
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" },
|
133
|
+
{ "internalType": "uint256", "name": "max", "type": "uint256" }
|
134
|
+
],
|
135
|
+
"name": "ERC4626ExceededMaxWithdraw",
|
136
|
+
"type": "error"
|
137
|
+
},
|
138
|
+
{ "inputs": [], "name": "FailedInnerCall", "type": "error" },
|
139
|
+
{
|
140
|
+
"inputs": [
|
141
|
+
{ "internalType": "address", "name": "account", "type": "address" },
|
142
|
+
{ "internalType": "uint256", "name": "currentNonce", "type": "uint256" }
|
143
|
+
],
|
144
|
+
"name": "InvalidAccountNonce",
|
145
|
+
"type": "error"
|
146
|
+
},
|
147
|
+
{ "inputs": [], "name": "InvalidShortString", "type": "error" },
|
148
|
+
{ "inputs": [], "name": "MathOverflowedMulDiv", "type": "error" },
|
149
|
+
{
|
150
|
+
"inputs": [
|
151
|
+
{ "internalType": "address", "name": "token", "type": "address" }
|
152
|
+
],
|
153
|
+
"name": "SafeERC20FailedOperation",
|
154
|
+
"type": "error"
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"inputs": [{ "internalType": "string", "name": "str", "type": "string" }],
|
158
|
+
"name": "StringTooLong",
|
159
|
+
"type": "error"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"anonymous": false,
|
163
|
+
"inputs": [
|
164
|
+
{
|
165
|
+
"indexed": true,
|
166
|
+
"internalType": "address",
|
167
|
+
"name": "owner",
|
168
|
+
"type": "address"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"indexed": true,
|
172
|
+
"internalType": "address",
|
173
|
+
"name": "spender",
|
174
|
+
"type": "address"
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"indexed": false,
|
178
|
+
"internalType": "uint256",
|
179
|
+
"name": "value",
|
180
|
+
"type": "uint256"
|
181
|
+
}
|
182
|
+
],
|
183
|
+
"name": "Approval",
|
184
|
+
"type": "event"
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"anonymous": false,
|
188
|
+
"inputs": [
|
189
|
+
{
|
190
|
+
"indexed": true,
|
191
|
+
"internalType": "address",
|
192
|
+
"name": "sender",
|
193
|
+
"type": "address"
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"indexed": true,
|
197
|
+
"internalType": "address",
|
198
|
+
"name": "owner",
|
199
|
+
"type": "address"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"indexed": false,
|
203
|
+
"internalType": "uint256",
|
204
|
+
"name": "assets",
|
205
|
+
"type": "uint256"
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"indexed": false,
|
209
|
+
"internalType": "uint256",
|
210
|
+
"name": "shares",
|
211
|
+
"type": "uint256"
|
212
|
+
}
|
213
|
+
],
|
214
|
+
"name": "Deposit",
|
215
|
+
"type": "event"
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"anonymous": false,
|
219
|
+
"inputs": [],
|
220
|
+
"name": "EIP712DomainChanged",
|
221
|
+
"type": "event"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"anonymous": false,
|
225
|
+
"inputs": [
|
226
|
+
{
|
227
|
+
"indexed": true,
|
228
|
+
"internalType": "address",
|
229
|
+
"name": "from",
|
230
|
+
"type": "address"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"indexed": true,
|
234
|
+
"internalType": "address",
|
235
|
+
"name": "to",
|
236
|
+
"type": "address"
|
237
|
+
},
|
238
|
+
{
|
239
|
+
"indexed": false,
|
240
|
+
"internalType": "uint256",
|
241
|
+
"name": "value",
|
242
|
+
"type": "uint256"
|
243
|
+
}
|
244
|
+
],
|
245
|
+
"name": "Transfer",
|
246
|
+
"type": "event"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"anonymous": false,
|
250
|
+
"inputs": [
|
251
|
+
{
|
252
|
+
"indexed": true,
|
253
|
+
"internalType": "address",
|
254
|
+
"name": "sender",
|
255
|
+
"type": "address"
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"indexed": true,
|
259
|
+
"internalType": "address",
|
260
|
+
"name": "receiver",
|
261
|
+
"type": "address"
|
262
|
+
},
|
263
|
+
{
|
264
|
+
"indexed": true,
|
265
|
+
"internalType": "address",
|
266
|
+
"name": "owner",
|
267
|
+
"type": "address"
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"indexed": false,
|
271
|
+
"internalType": "uint256",
|
272
|
+
"name": "assets",
|
273
|
+
"type": "uint256"
|
274
|
+
},
|
275
|
+
{
|
276
|
+
"indexed": false,
|
277
|
+
"internalType": "uint256",
|
278
|
+
"name": "shares",
|
279
|
+
"type": "uint256"
|
280
|
+
}
|
281
|
+
],
|
282
|
+
"name": "Withdraw",
|
283
|
+
"type": "event"
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"inputs": [],
|
287
|
+
"name": "DOMAIN_SEPARATOR",
|
288
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
289
|
+
"stateMutability": "view",
|
290
|
+
"type": "function"
|
291
|
+
},
|
292
|
+
{
|
293
|
+
"inputs": [],
|
294
|
+
"name": "PERMIT_TYPEHASH",
|
295
|
+
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
|
296
|
+
"stateMutability": "view",
|
297
|
+
"type": "function"
|
298
|
+
},
|
299
|
+
{
|
300
|
+
"inputs": [],
|
301
|
+
"name": "VERSION",
|
302
|
+
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
303
|
+
"stateMutability": "view",
|
304
|
+
"type": "function"
|
305
|
+
},
|
306
|
+
{
|
307
|
+
"inputs": [
|
308
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
309
|
+
{ "internalType": "address", "name": "spender", "type": "address" }
|
310
|
+
],
|
311
|
+
"name": "allowance",
|
312
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
313
|
+
"stateMutability": "view",
|
314
|
+
"type": "function"
|
315
|
+
},
|
316
|
+
{
|
317
|
+
"inputs": [
|
318
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
319
|
+
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
320
|
+
],
|
321
|
+
"name": "approve",
|
322
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
323
|
+
"stateMutability": "nonpayable",
|
324
|
+
"type": "function"
|
325
|
+
},
|
326
|
+
{
|
327
|
+
"inputs": [],
|
328
|
+
"name": "asset",
|
329
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
330
|
+
"stateMutability": "view",
|
331
|
+
"type": "function"
|
332
|
+
},
|
333
|
+
{
|
334
|
+
"inputs": [
|
335
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
336
|
+
],
|
337
|
+
"name": "balanceOf",
|
338
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
339
|
+
"stateMutability": "view",
|
340
|
+
"type": "function"
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"inputs": [
|
344
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" }
|
345
|
+
],
|
346
|
+
"name": "convertToAssets",
|
347
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
348
|
+
"stateMutability": "view",
|
349
|
+
"type": "function"
|
350
|
+
},
|
351
|
+
{
|
352
|
+
"inputs": [
|
353
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" }
|
354
|
+
],
|
355
|
+
"name": "convertToShares",
|
356
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
357
|
+
"stateMutability": "view",
|
358
|
+
"type": "function"
|
359
|
+
},
|
360
|
+
{
|
361
|
+
"inputs": [],
|
362
|
+
"name": "decimals",
|
363
|
+
"outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
|
364
|
+
"stateMutability": "view",
|
365
|
+
"type": "function"
|
366
|
+
},
|
367
|
+
{
|
368
|
+
"inputs": [
|
369
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
370
|
+
{
|
371
|
+
"internalType": "uint256",
|
372
|
+
"name": "requestedDecrease",
|
373
|
+
"type": "uint256"
|
374
|
+
}
|
375
|
+
],
|
376
|
+
"name": "decreaseAllowance",
|
377
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
378
|
+
"stateMutability": "nonpayable",
|
379
|
+
"type": "function"
|
380
|
+
},
|
381
|
+
{
|
382
|
+
"inputs": [],
|
383
|
+
"name": "deploymentChainId",
|
384
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
385
|
+
"stateMutability": "view",
|
386
|
+
"type": "function"
|
387
|
+
},
|
388
|
+
{
|
389
|
+
"inputs": [
|
390
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" },
|
391
|
+
{ "internalType": "address", "name": "receiver", "type": "address" }
|
392
|
+
],
|
393
|
+
"name": "deposit",
|
394
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
395
|
+
"stateMutability": "nonpayable",
|
396
|
+
"type": "function"
|
397
|
+
},
|
398
|
+
{
|
399
|
+
"inputs": [],
|
400
|
+
"name": "eip712Domain",
|
401
|
+
"outputs": [
|
402
|
+
{ "internalType": "bytes1", "name": "fields", "type": "bytes1" },
|
403
|
+
{ "internalType": "string", "name": "name", "type": "string" },
|
404
|
+
{ "internalType": "string", "name": "version", "type": "string" },
|
405
|
+
{ "internalType": "uint256", "name": "chainId", "type": "uint256" },
|
406
|
+
{
|
407
|
+
"internalType": "address",
|
408
|
+
"name": "verifyingContract",
|
409
|
+
"type": "address"
|
410
|
+
},
|
411
|
+
{ "internalType": "bytes32", "name": "salt", "type": "bytes32" },
|
412
|
+
{ "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" }
|
413
|
+
],
|
414
|
+
"stateMutability": "view",
|
415
|
+
"type": "function"
|
416
|
+
},
|
417
|
+
{
|
418
|
+
"inputs": [
|
419
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
420
|
+
{ "internalType": "uint256", "name": "addedValue", "type": "uint256" }
|
421
|
+
],
|
422
|
+
"name": "increaseAllowance",
|
423
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
424
|
+
"stateMutability": "nonpayable",
|
425
|
+
"type": "function"
|
426
|
+
},
|
427
|
+
{
|
428
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
429
|
+
"name": "maxDeposit",
|
430
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
431
|
+
"stateMutability": "view",
|
432
|
+
"type": "function"
|
433
|
+
},
|
434
|
+
{
|
435
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
436
|
+
"name": "maxMint",
|
437
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
438
|
+
"stateMutability": "view",
|
439
|
+
"type": "function"
|
440
|
+
},
|
441
|
+
{
|
442
|
+
"inputs": [
|
443
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
444
|
+
],
|
445
|
+
"name": "maxRedeem",
|
446
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
447
|
+
"stateMutability": "view",
|
448
|
+
"type": "function"
|
449
|
+
},
|
450
|
+
{
|
451
|
+
"inputs": [
|
452
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
453
|
+
],
|
454
|
+
"name": "maxWithdraw",
|
455
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
456
|
+
"stateMutability": "view",
|
457
|
+
"type": "function"
|
458
|
+
},
|
459
|
+
{
|
460
|
+
"inputs": [
|
461
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" },
|
462
|
+
{ "internalType": "address", "name": "receiver", "type": "address" }
|
463
|
+
],
|
464
|
+
"name": "mint",
|
465
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
466
|
+
"stateMutability": "nonpayable",
|
467
|
+
"type": "function"
|
468
|
+
},
|
469
|
+
{
|
470
|
+
"inputs": [],
|
471
|
+
"name": "name",
|
472
|
+
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
473
|
+
"stateMutability": "view",
|
474
|
+
"type": "function"
|
475
|
+
},
|
476
|
+
{
|
477
|
+
"inputs": [
|
478
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
479
|
+
],
|
480
|
+
"name": "nonces",
|
481
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
482
|
+
"stateMutability": "view",
|
483
|
+
"type": "function"
|
484
|
+
},
|
485
|
+
{
|
486
|
+
"inputs": [
|
487
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
488
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
489
|
+
{ "internalType": "uint256", "name": "value", "type": "uint256" },
|
490
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
491
|
+
{ "internalType": "bytes", "name": "signature", "type": "bytes" }
|
492
|
+
],
|
493
|
+
"name": "permit",
|
494
|
+
"outputs": [],
|
495
|
+
"stateMutability": "nonpayable",
|
496
|
+
"type": "function"
|
497
|
+
},
|
498
|
+
{
|
499
|
+
"inputs": [
|
500
|
+
{ "internalType": "address", "name": "owner", "type": "address" },
|
501
|
+
{ "internalType": "address", "name": "spender", "type": "address" },
|
502
|
+
{ "internalType": "uint256", "name": "value", "type": "uint256" },
|
503
|
+
{ "internalType": "uint256", "name": "deadline", "type": "uint256" },
|
504
|
+
{ "internalType": "uint8", "name": "v", "type": "uint8" },
|
505
|
+
{ "internalType": "bytes32", "name": "r", "type": "bytes32" },
|
506
|
+
{ "internalType": "bytes32", "name": "s", "type": "bytes32" }
|
507
|
+
],
|
508
|
+
"name": "permit",
|
509
|
+
"outputs": [],
|
510
|
+
"stateMutability": "nonpayable",
|
511
|
+
"type": "function"
|
512
|
+
},
|
513
|
+
{
|
514
|
+
"inputs": [
|
515
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" }
|
516
|
+
],
|
517
|
+
"name": "previewDeposit",
|
518
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
519
|
+
"stateMutability": "view",
|
520
|
+
"type": "function"
|
521
|
+
},
|
522
|
+
{
|
523
|
+
"inputs": [
|
524
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" }
|
525
|
+
],
|
526
|
+
"name": "previewMint",
|
527
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
528
|
+
"stateMutability": "view",
|
529
|
+
"type": "function"
|
530
|
+
},
|
531
|
+
{
|
532
|
+
"inputs": [
|
533
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" }
|
534
|
+
],
|
535
|
+
"name": "previewRedeem",
|
536
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
537
|
+
"stateMutability": "view",
|
538
|
+
"type": "function"
|
539
|
+
},
|
540
|
+
{
|
541
|
+
"inputs": [
|
542
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" }
|
543
|
+
],
|
544
|
+
"name": "previewWithdraw",
|
545
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
546
|
+
"stateMutability": "view",
|
547
|
+
"type": "function"
|
548
|
+
},
|
549
|
+
{
|
550
|
+
"inputs": [
|
551
|
+
{ "internalType": "uint256", "name": "shares", "type": "uint256" },
|
552
|
+
{ "internalType": "address", "name": "receiver", "type": "address" },
|
553
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
554
|
+
],
|
555
|
+
"name": "redeem",
|
556
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
557
|
+
"stateMutability": "nonpayable",
|
558
|
+
"type": "function"
|
559
|
+
},
|
560
|
+
{
|
561
|
+
"inputs": [],
|
562
|
+
"name": "symbol",
|
563
|
+
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
|
564
|
+
"stateMutability": "view",
|
565
|
+
"type": "function"
|
566
|
+
},
|
567
|
+
{
|
568
|
+
"inputs": [],
|
569
|
+
"name": "totalAssets",
|
570
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
571
|
+
"stateMutability": "view",
|
572
|
+
"type": "function"
|
573
|
+
},
|
574
|
+
{
|
575
|
+
"inputs": [],
|
576
|
+
"name": "totalSupply",
|
577
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
578
|
+
"stateMutability": "view",
|
579
|
+
"type": "function"
|
580
|
+
},
|
581
|
+
{
|
582
|
+
"inputs": [
|
583
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
584
|
+
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
585
|
+
],
|
586
|
+
"name": "transfer",
|
587
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
588
|
+
"stateMutability": "nonpayable",
|
589
|
+
"type": "function"
|
590
|
+
},
|
591
|
+
{
|
592
|
+
"inputs": [
|
593
|
+
{ "internalType": "address", "name": "from", "type": "address" },
|
594
|
+
{ "internalType": "address", "name": "to", "type": "address" },
|
595
|
+
{ "internalType": "uint256", "name": "value", "type": "uint256" }
|
596
|
+
],
|
597
|
+
"name": "transferFrom",
|
598
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
599
|
+
"stateMutability": "nonpayable",
|
600
|
+
"type": "function"
|
601
|
+
},
|
602
|
+
{
|
603
|
+
"inputs": [
|
604
|
+
{ "internalType": "uint256", "name": "assets", "type": "uint256" },
|
605
|
+
{ "internalType": "address", "name": "receiver", "type": "address" },
|
606
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
607
|
+
],
|
608
|
+
"name": "withdraw",
|
609
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
610
|
+
"stateMutability": "nonpayable",
|
611
|
+
"type": "function"
|
612
|
+
},
|
613
|
+
{
|
614
|
+
"inputs": [],
|
615
|
+
"name": "wxdai",
|
616
|
+
"outputs": [
|
617
|
+
{ "internalType": "contract IWXDAI", "name": "", "type": "address" }
|
618
|
+
],
|
619
|
+
"stateMutability": "view",
|
620
|
+
"type": "function"
|
621
|
+
},
|
622
|
+
{ "stateMutability": "payable", "type": "receive" }
|
623
|
+
]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"constant": true,
|
4
|
+
"inputs": [],
|
5
|
+
"name": "implementation",
|
6
|
+
"outputs": [{ "name": "impl", "type": "address" }],
|
7
|
+
"payable": false,
|
8
|
+
"stateMutability": "view",
|
9
|
+
"type": "function"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"inputs": [
|
13
|
+
{ "name": "_tokenImage", "type": "address" },
|
14
|
+
{ "name": "_name", "type": "string" },
|
15
|
+
{ "name": "_symbol", "type": "string" },
|
16
|
+
{ "name": "_decimals", "type": "uint8" },
|
17
|
+
{ "name": "_chainId", "type": "uint256" }
|
18
|
+
],
|
19
|
+
"payable": false,
|
20
|
+
"stateMutability": "nonpayable",
|
21
|
+
"type": "constructor"
|
22
|
+
},
|
23
|
+
{ "payable": true, "stateMutability": "payable", "type": "fallback" }
|
24
|
+
]
|
@@ -209,7 +209,9 @@ class DeployableTraderAgent(DeployableAgent):
|
|
209
209
|
def have_bet_on_market_since(self, market: AgentMarket, since: timedelta) -> bool:
|
210
210
|
return have_bet_on_market_since(keys=APIKeys(), market=market, since=since)
|
211
211
|
|
212
|
-
def pick_markets(
|
212
|
+
def pick_markets(
|
213
|
+
self, market_type: MarketType, markets: t.Sequence[AgentMarket]
|
214
|
+
) -> t.Sequence[AgentMarket]:
|
213
215
|
"""
|
214
216
|
Subclasses can implement their own logic instead of this one, or on top of this one.
|
215
217
|
By default, it picks only the first {n_markets_per_run} markets where user didn't bet recently and it's a reasonable question.
|
@@ -227,6 +229,12 @@ class DeployableTraderAgent(DeployableAgent):
|
|
227
229
|
if not is_predictable_binary(market.question):
|
228
230
|
continue
|
229
231
|
|
232
|
+
# Manifold allows to bet only on markets with probability between 1 and 99.
|
233
|
+
if market_type == MarketType.MANIFOLD and not (
|
234
|
+
1 < market.current_p_yes < 99
|
235
|
+
):
|
236
|
+
continue
|
237
|
+
|
230
238
|
picked.append(market)
|
231
239
|
|
232
240
|
return picked
|
@@ -275,7 +283,7 @@ class DeployableTraderAgent(DeployableAgent):
|
|
275
283
|
Processes bets placed by agents on a given market.
|
276
284
|
"""
|
277
285
|
available_markets = self.get_markets(market_type)
|
278
|
-
markets = self.pick_markets(available_markets)
|
286
|
+
markets = self.pick_markets(market_type, available_markets)
|
279
287
|
for market in markets:
|
280
288
|
result = self.answer_binary_market(market)
|
281
289
|
if result is None:
|