prediction-market-agent-tooling 0.65.5__py3-none-any.whl → 0.69.17.dev1149__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.
Files changed (88) hide show
  1. prediction_market_agent_tooling/abis/agentresultmapping.abi.json +192 -0
  2. prediction_market_agent_tooling/abis/erc1155.abi.json +352 -0
  3. prediction_market_agent_tooling/abis/processor.abi.json +16 -0
  4. prediction_market_agent_tooling/abis/swapr_quoter.abi.json +221 -0
  5. prediction_market_agent_tooling/abis/swapr_router.abi.json +634 -0
  6. prediction_market_agent_tooling/benchmark/benchmark.py +1 -1
  7. prediction_market_agent_tooling/benchmark/utils.py +13 -0
  8. prediction_market_agent_tooling/chains.py +1 -0
  9. prediction_market_agent_tooling/config.py +61 -2
  10. prediction_market_agent_tooling/data_download/langfuse_data_downloader.py +405 -0
  11. prediction_market_agent_tooling/deploy/agent.py +199 -67
  12. prediction_market_agent_tooling/deploy/agent_example.py +1 -1
  13. prediction_market_agent_tooling/deploy/betting_strategy.py +412 -68
  14. prediction_market_agent_tooling/deploy/constants.py +6 -0
  15. prediction_market_agent_tooling/gtypes.py +11 -1
  16. prediction_market_agent_tooling/jobs/jobs_models.py +2 -2
  17. prediction_market_agent_tooling/jobs/omen/omen_jobs.py +19 -20
  18. prediction_market_agent_tooling/loggers.py +9 -1
  19. prediction_market_agent_tooling/logprobs_parser.py +2 -1
  20. prediction_market_agent_tooling/markets/agent_market.py +106 -18
  21. prediction_market_agent_tooling/markets/blockchain_utils.py +37 -19
  22. prediction_market_agent_tooling/markets/data_models.py +120 -7
  23. prediction_market_agent_tooling/markets/manifold/data_models.py +5 -3
  24. prediction_market_agent_tooling/markets/manifold/manifold.py +21 -2
  25. prediction_market_agent_tooling/markets/manifold/utils.py +8 -2
  26. prediction_market_agent_tooling/markets/market_type.py +74 -0
  27. prediction_market_agent_tooling/markets/markets.py +7 -99
  28. prediction_market_agent_tooling/markets/metaculus/data_models.py +3 -3
  29. prediction_market_agent_tooling/markets/metaculus/metaculus.py +5 -8
  30. prediction_market_agent_tooling/markets/omen/cow_contracts.py +5 -1
  31. prediction_market_agent_tooling/markets/omen/data_models.py +63 -32
  32. prediction_market_agent_tooling/markets/omen/omen.py +112 -23
  33. prediction_market_agent_tooling/markets/omen/omen_constants.py +8 -0
  34. prediction_market_agent_tooling/markets/omen/omen_contracts.py +18 -203
  35. prediction_market_agent_tooling/markets/omen/omen_resolving.py +33 -13
  36. prediction_market_agent_tooling/markets/omen/omen_subgraph_handler.py +23 -18
  37. prediction_market_agent_tooling/markets/polymarket/api.py +123 -100
  38. prediction_market_agent_tooling/markets/polymarket/clob_manager.py +156 -0
  39. prediction_market_agent_tooling/markets/polymarket/constants.py +15 -0
  40. prediction_market_agent_tooling/markets/polymarket/data_models.py +95 -19
  41. prediction_market_agent_tooling/markets/polymarket/polymarket.py +373 -29
  42. prediction_market_agent_tooling/markets/polymarket/polymarket_contracts.py +35 -0
  43. prediction_market_agent_tooling/markets/polymarket/polymarket_subgraph_handler.py +91 -0
  44. prediction_market_agent_tooling/markets/polymarket/utils.py +1 -22
  45. prediction_market_agent_tooling/markets/seer/data_models.py +111 -17
  46. prediction_market_agent_tooling/markets/seer/exceptions.py +2 -0
  47. prediction_market_agent_tooling/markets/seer/price_manager.py +165 -50
  48. prediction_market_agent_tooling/markets/seer/seer.py +393 -106
  49. prediction_market_agent_tooling/markets/seer/seer_api.py +28 -0
  50. prediction_market_agent_tooling/markets/seer/seer_contracts.py +115 -5
  51. prediction_market_agent_tooling/markets/seer/seer_subgraph_handler.py +297 -66
  52. prediction_market_agent_tooling/markets/seer/subgraph_data_models.py +43 -8
  53. prediction_market_agent_tooling/markets/seer/swap_pool_handler.py +80 -0
  54. prediction_market_agent_tooling/tools/_generic_value.py +8 -2
  55. prediction_market_agent_tooling/tools/betting_strategies/kelly_criterion.py +271 -8
  56. prediction_market_agent_tooling/tools/betting_strategies/utils.py +6 -1
  57. prediction_market_agent_tooling/tools/caches/db_cache.py +219 -117
  58. prediction_market_agent_tooling/tools/caches/serializers.py +11 -2
  59. prediction_market_agent_tooling/tools/contract.py +480 -38
  60. prediction_market_agent_tooling/tools/contract_utils.py +61 -0
  61. prediction_market_agent_tooling/tools/cow/cow_order.py +218 -45
  62. prediction_market_agent_tooling/tools/cow/models.py +122 -0
  63. prediction_market_agent_tooling/tools/cow/semaphore.py +104 -0
  64. prediction_market_agent_tooling/tools/datetime_utc.py +14 -2
  65. prediction_market_agent_tooling/tools/db/db_manager.py +59 -0
  66. prediction_market_agent_tooling/tools/hexbytes_custom.py +4 -1
  67. prediction_market_agent_tooling/tools/httpx_cached_client.py +15 -6
  68. prediction_market_agent_tooling/tools/langfuse_client_utils.py +21 -8
  69. prediction_market_agent_tooling/tools/openai_utils.py +31 -0
  70. prediction_market_agent_tooling/tools/perplexity/perplexity_client.py +86 -0
  71. prediction_market_agent_tooling/tools/perplexity/perplexity_models.py +26 -0
  72. prediction_market_agent_tooling/tools/perplexity/perplexity_search.py +73 -0
  73. prediction_market_agent_tooling/tools/rephrase.py +71 -0
  74. prediction_market_agent_tooling/tools/singleton.py +11 -6
  75. prediction_market_agent_tooling/tools/streamlit_utils.py +188 -0
  76. prediction_market_agent_tooling/tools/tokens/auto_deposit.py +64 -0
  77. prediction_market_agent_tooling/tools/tokens/auto_withdraw.py +8 -0
  78. prediction_market_agent_tooling/tools/tokens/slippage.py +21 -0
  79. prediction_market_agent_tooling/tools/tokens/usd.py +5 -2
  80. prediction_market_agent_tooling/tools/utils.py +61 -3
  81. prediction_market_agent_tooling/tools/web3_utils.py +63 -9
  82. {prediction_market_agent_tooling-0.65.5.dist-info → prediction_market_agent_tooling-0.69.17.dev1149.dist-info}/METADATA +13 -9
  83. {prediction_market_agent_tooling-0.65.5.dist-info → prediction_market_agent_tooling-0.69.17.dev1149.dist-info}/RECORD +86 -64
  84. {prediction_market_agent_tooling-0.65.5.dist-info → prediction_market_agent_tooling-0.69.17.dev1149.dist-info}/WHEEL +1 -1
  85. prediction_market_agent_tooling/abis/omen_agentresultmapping.abi.json +0 -171
  86. prediction_market_agent_tooling/markets/polymarket/data_models_web.py +0 -420
  87. {prediction_market_agent_tooling-0.65.5.dist-info → prediction_market_agent_tooling-0.69.17.dev1149.dist-info}/entry_points.txt +0 -0
  88. {prediction_market_agent_tooling-0.65.5.dist-info → prediction_market_agent_tooling-0.69.17.dev1149.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,634 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_factory",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_WNativeToken",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "_poolDeployer",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "WNativeToken",
26
+ "outputs": [
27
+ {
28
+ "internalType": "address",
29
+ "name": "",
30
+ "type": "address"
31
+ }
32
+ ],
33
+ "stateMutability": "view",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "inputs": [
38
+ {
39
+ "internalType": "int256",
40
+ "name": "amount0Delta",
41
+ "type": "int256"
42
+ },
43
+ {
44
+ "internalType": "int256",
45
+ "name": "amount1Delta",
46
+ "type": "int256"
47
+ },
48
+ {
49
+ "internalType": "bytes",
50
+ "name": "_data",
51
+ "type": "bytes"
52
+ }
53
+ ],
54
+ "name": "algebraSwapCallback",
55
+ "outputs": [],
56
+ "stateMutability": "nonpayable",
57
+ "type": "function"
58
+ },
59
+ {
60
+ "inputs": [
61
+ {
62
+ "components": [
63
+ {
64
+ "internalType": "bytes",
65
+ "name": "path",
66
+ "type": "bytes"
67
+ },
68
+ {
69
+ "internalType": "address",
70
+ "name": "recipient",
71
+ "type": "address"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "deadline",
76
+ "type": "uint256"
77
+ },
78
+ {
79
+ "internalType": "uint256",
80
+ "name": "amountIn",
81
+ "type": "uint256"
82
+ },
83
+ {
84
+ "internalType": "uint256",
85
+ "name": "amountOutMinimum",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "internalType": "struct ISwapRouter.ExactInputParams",
90
+ "name": "params",
91
+ "type": "tuple"
92
+ }
93
+ ],
94
+ "name": "exactInput",
95
+ "outputs": [
96
+ {
97
+ "internalType": "uint256",
98
+ "name": "amountOut",
99
+ "type": "uint256"
100
+ }
101
+ ],
102
+ "stateMutability": "payable",
103
+ "type": "function"
104
+ },
105
+ {
106
+ "inputs": [
107
+ {
108
+ "components": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "tokenIn",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "internalType": "address",
116
+ "name": "tokenOut",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "internalType": "address",
121
+ "name": "recipient",
122
+ "type": "address"
123
+ },
124
+ {
125
+ "internalType": "uint256",
126
+ "name": "deadline",
127
+ "type": "uint256"
128
+ },
129
+ {
130
+ "internalType": "uint256",
131
+ "name": "amountIn",
132
+ "type": "uint256"
133
+ },
134
+ {
135
+ "internalType": "uint256",
136
+ "name": "amountOutMinimum",
137
+ "type": "uint256"
138
+ },
139
+ {
140
+ "internalType": "uint160",
141
+ "name": "limitSqrtPrice",
142
+ "type": "uint160"
143
+ }
144
+ ],
145
+ "internalType": "struct ISwapRouter.ExactInputSingleParams",
146
+ "name": "params",
147
+ "type": "tuple"
148
+ }
149
+ ],
150
+ "name": "exactInputSingle",
151
+ "outputs": [
152
+ {
153
+ "internalType": "uint256",
154
+ "name": "amountOut",
155
+ "type": "uint256"
156
+ }
157
+ ],
158
+ "stateMutability": "payable",
159
+ "type": "function"
160
+ },
161
+ {
162
+ "inputs": [
163
+ {
164
+ "components": [
165
+ {
166
+ "internalType": "address",
167
+ "name": "tokenIn",
168
+ "type": "address"
169
+ },
170
+ {
171
+ "internalType": "address",
172
+ "name": "tokenOut",
173
+ "type": "address"
174
+ },
175
+ {
176
+ "internalType": "address",
177
+ "name": "recipient",
178
+ "type": "address"
179
+ },
180
+ {
181
+ "internalType": "uint256",
182
+ "name": "deadline",
183
+ "type": "uint256"
184
+ },
185
+ {
186
+ "internalType": "uint256",
187
+ "name": "amountIn",
188
+ "type": "uint256"
189
+ },
190
+ {
191
+ "internalType": "uint256",
192
+ "name": "amountOutMinimum",
193
+ "type": "uint256"
194
+ },
195
+ {
196
+ "internalType": "uint160",
197
+ "name": "limitSqrtPrice",
198
+ "type": "uint160"
199
+ }
200
+ ],
201
+ "internalType": "struct ISwapRouter.ExactInputSingleParams",
202
+ "name": "params",
203
+ "type": "tuple"
204
+ }
205
+ ],
206
+ "name": "exactInputSingleSupportingFeeOnTransferTokens",
207
+ "outputs": [
208
+ {
209
+ "internalType": "uint256",
210
+ "name": "amountOut",
211
+ "type": "uint256"
212
+ }
213
+ ],
214
+ "stateMutability": "nonpayable",
215
+ "type": "function"
216
+ },
217
+ {
218
+ "inputs": [
219
+ {
220
+ "components": [
221
+ {
222
+ "internalType": "bytes",
223
+ "name": "path",
224
+ "type": "bytes"
225
+ },
226
+ {
227
+ "internalType": "address",
228
+ "name": "recipient",
229
+ "type": "address"
230
+ },
231
+ {
232
+ "internalType": "uint256",
233
+ "name": "deadline",
234
+ "type": "uint256"
235
+ },
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "amountOut",
239
+ "type": "uint256"
240
+ },
241
+ {
242
+ "internalType": "uint256",
243
+ "name": "amountInMaximum",
244
+ "type": "uint256"
245
+ }
246
+ ],
247
+ "internalType": "struct ISwapRouter.ExactOutputParams",
248
+ "name": "params",
249
+ "type": "tuple"
250
+ }
251
+ ],
252
+ "name": "exactOutput",
253
+ "outputs": [
254
+ {
255
+ "internalType": "uint256",
256
+ "name": "amountIn",
257
+ "type": "uint256"
258
+ }
259
+ ],
260
+ "stateMutability": "payable",
261
+ "type": "function"
262
+ },
263
+ {
264
+ "inputs": [
265
+ {
266
+ "components": [
267
+ {
268
+ "internalType": "address",
269
+ "name": "tokenIn",
270
+ "type": "address"
271
+ },
272
+ {
273
+ "internalType": "address",
274
+ "name": "tokenOut",
275
+ "type": "address"
276
+ },
277
+ {
278
+ "internalType": "uint24",
279
+ "name": "fee",
280
+ "type": "uint24"
281
+ },
282
+ {
283
+ "internalType": "address",
284
+ "name": "recipient",
285
+ "type": "address"
286
+ },
287
+ {
288
+ "internalType": "uint256",
289
+ "name": "deadline",
290
+ "type": "uint256"
291
+ },
292
+ {
293
+ "internalType": "uint256",
294
+ "name": "amountOut",
295
+ "type": "uint256"
296
+ },
297
+ {
298
+ "internalType": "uint256",
299
+ "name": "amountInMaximum",
300
+ "type": "uint256"
301
+ },
302
+ {
303
+ "internalType": "uint160",
304
+ "name": "limitSqrtPrice",
305
+ "type": "uint160"
306
+ }
307
+ ],
308
+ "internalType": "struct ISwapRouter.ExactOutputSingleParams",
309
+ "name": "params",
310
+ "type": "tuple"
311
+ }
312
+ ],
313
+ "name": "exactOutputSingle",
314
+ "outputs": [
315
+ {
316
+ "internalType": "uint256",
317
+ "name": "amountIn",
318
+ "type": "uint256"
319
+ }
320
+ ],
321
+ "stateMutability": "payable",
322
+ "type": "function"
323
+ },
324
+ {
325
+ "inputs": [],
326
+ "name": "factory",
327
+ "outputs": [
328
+ {
329
+ "internalType": "address",
330
+ "name": "",
331
+ "type": "address"
332
+ }
333
+ ],
334
+ "stateMutability": "view",
335
+ "type": "function"
336
+ },
337
+ {
338
+ "inputs": [
339
+ {
340
+ "internalType": "bytes[]",
341
+ "name": "data",
342
+ "type": "bytes[]"
343
+ }
344
+ ],
345
+ "name": "multicall",
346
+ "outputs": [
347
+ {
348
+ "internalType": "bytes[]",
349
+ "name": "results",
350
+ "type": "bytes[]"
351
+ }
352
+ ],
353
+ "stateMutability": "payable",
354
+ "type": "function"
355
+ },
356
+ {
357
+ "inputs": [],
358
+ "name": "poolDeployer",
359
+ "outputs": [
360
+ {
361
+ "internalType": "address",
362
+ "name": "",
363
+ "type": "address"
364
+ }
365
+ ],
366
+ "stateMutability": "view",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [],
371
+ "name": "refundNativeToken",
372
+ "outputs": [],
373
+ "stateMutability": "payable",
374
+ "type": "function"
375
+ },
376
+ {
377
+ "inputs": [
378
+ {
379
+ "internalType": "address",
380
+ "name": "token",
381
+ "type": "address"
382
+ },
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "value",
386
+ "type": "uint256"
387
+ },
388
+ {
389
+ "internalType": "uint256",
390
+ "name": "deadline",
391
+ "type": "uint256"
392
+ },
393
+ {
394
+ "internalType": "uint8",
395
+ "name": "v",
396
+ "type": "uint8"
397
+ },
398
+ {
399
+ "internalType": "bytes32",
400
+ "name": "r",
401
+ "type": "bytes32"
402
+ },
403
+ {
404
+ "internalType": "bytes32",
405
+ "name": "s",
406
+ "type": "bytes32"
407
+ }
408
+ ],
409
+ "name": "selfPermit",
410
+ "outputs": [],
411
+ "stateMutability": "payable",
412
+ "type": "function"
413
+ },
414
+ {
415
+ "inputs": [
416
+ {
417
+ "internalType": "address",
418
+ "name": "token",
419
+ "type": "address"
420
+ },
421
+ {
422
+ "internalType": "uint256",
423
+ "name": "nonce",
424
+ "type": "uint256"
425
+ },
426
+ {
427
+ "internalType": "uint256",
428
+ "name": "expiry",
429
+ "type": "uint256"
430
+ },
431
+ {
432
+ "internalType": "uint8",
433
+ "name": "v",
434
+ "type": "uint8"
435
+ },
436
+ {
437
+ "internalType": "bytes32",
438
+ "name": "r",
439
+ "type": "bytes32"
440
+ },
441
+ {
442
+ "internalType": "bytes32",
443
+ "name": "s",
444
+ "type": "bytes32"
445
+ }
446
+ ],
447
+ "name": "selfPermitAllowed",
448
+ "outputs": [],
449
+ "stateMutability": "payable",
450
+ "type": "function"
451
+ },
452
+ {
453
+ "inputs": [
454
+ {
455
+ "internalType": "address",
456
+ "name": "token",
457
+ "type": "address"
458
+ },
459
+ {
460
+ "internalType": "uint256",
461
+ "name": "nonce",
462
+ "type": "uint256"
463
+ },
464
+ {
465
+ "internalType": "uint256",
466
+ "name": "expiry",
467
+ "type": "uint256"
468
+ },
469
+ {
470
+ "internalType": "uint8",
471
+ "name": "v",
472
+ "type": "uint8"
473
+ },
474
+ {
475
+ "internalType": "bytes32",
476
+ "name": "r",
477
+ "type": "bytes32"
478
+ },
479
+ {
480
+ "internalType": "bytes32",
481
+ "name": "s",
482
+ "type": "bytes32"
483
+ }
484
+ ],
485
+ "name": "selfPermitAllowedIfNecessary",
486
+ "outputs": [],
487
+ "stateMutability": "payable",
488
+ "type": "function"
489
+ },
490
+ {
491
+ "inputs": [
492
+ {
493
+ "internalType": "address",
494
+ "name": "token",
495
+ "type": "address"
496
+ },
497
+ {
498
+ "internalType": "uint256",
499
+ "name": "value",
500
+ "type": "uint256"
501
+ },
502
+ {
503
+ "internalType": "uint256",
504
+ "name": "deadline",
505
+ "type": "uint256"
506
+ },
507
+ {
508
+ "internalType": "uint8",
509
+ "name": "v",
510
+ "type": "uint8"
511
+ },
512
+ {
513
+ "internalType": "bytes32",
514
+ "name": "r",
515
+ "type": "bytes32"
516
+ },
517
+ {
518
+ "internalType": "bytes32",
519
+ "name": "s",
520
+ "type": "bytes32"
521
+ }
522
+ ],
523
+ "name": "selfPermitIfNecessary",
524
+ "outputs": [],
525
+ "stateMutability": "payable",
526
+ "type": "function"
527
+ },
528
+ {
529
+ "inputs": [
530
+ {
531
+ "internalType": "address",
532
+ "name": "token",
533
+ "type": "address"
534
+ },
535
+ {
536
+ "internalType": "uint256",
537
+ "name": "amountMinimum",
538
+ "type": "uint256"
539
+ },
540
+ {
541
+ "internalType": "address",
542
+ "name": "recipient",
543
+ "type": "address"
544
+ }
545
+ ],
546
+ "name": "sweepToken",
547
+ "outputs": [],
548
+ "stateMutability": "payable",
549
+ "type": "function"
550
+ },
551
+ {
552
+ "inputs": [
553
+ {
554
+ "internalType": "address",
555
+ "name": "token",
556
+ "type": "address"
557
+ },
558
+ {
559
+ "internalType": "uint256",
560
+ "name": "amountMinimum",
561
+ "type": "uint256"
562
+ },
563
+ {
564
+ "internalType": "address",
565
+ "name": "recipient",
566
+ "type": "address"
567
+ },
568
+ {
569
+ "internalType": "uint256",
570
+ "name": "feeBips",
571
+ "type": "uint256"
572
+ },
573
+ {
574
+ "internalType": "address",
575
+ "name": "feeRecipient",
576
+ "type": "address"
577
+ }
578
+ ],
579
+ "name": "sweepTokenWithFee",
580
+ "outputs": [],
581
+ "stateMutability": "payable",
582
+ "type": "function"
583
+ },
584
+ {
585
+ "inputs": [
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "amountMinimum",
589
+ "type": "uint256"
590
+ },
591
+ {
592
+ "internalType": "address",
593
+ "name": "recipient",
594
+ "type": "address"
595
+ }
596
+ ],
597
+ "name": "unwrapWNativeToken",
598
+ "outputs": [],
599
+ "stateMutability": "payable",
600
+ "type": "function"
601
+ },
602
+ {
603
+ "inputs": [
604
+ {
605
+ "internalType": "uint256",
606
+ "name": "amountMinimum",
607
+ "type": "uint256"
608
+ },
609
+ {
610
+ "internalType": "address",
611
+ "name": "recipient",
612
+ "type": "address"
613
+ },
614
+ {
615
+ "internalType": "uint256",
616
+ "name": "feeBips",
617
+ "type": "uint256"
618
+ },
619
+ {
620
+ "internalType": "address",
621
+ "name": "feeRecipient",
622
+ "type": "address"
623
+ }
624
+ ],
625
+ "name": "unwrapWNativeTokenWithFee",
626
+ "outputs": [],
627
+ "stateMutability": "payable",
628
+ "type": "function"
629
+ },
630
+ {
631
+ "stateMutability": "payable",
632
+ "type": "receive"
633
+ }
634
+ ]
@@ -456,4 +456,4 @@ class Benchmarker:
456
456
  md += "\n\n"
457
457
  md += "### Markets\n\n"
458
458
  md += pd.DataFrame(self.get_markets_summary()).to_markdown(index=False)
459
- return md
459
+ return str(md)
@@ -6,6 +6,7 @@ from pydantic import BaseModel
6
6
  from prediction_market_agent_tooling.gtypes import OutcomeStr, Probability
7
7
  from prediction_market_agent_tooling.markets.data_models import (
8
8
  CategoricalProbabilisticAnswer,
9
+ ScalarProbabilisticAnswer,
9
10
  )
10
11
 
11
12
 
@@ -16,6 +17,18 @@ def get_most_probable_outcome(
16
17
  return max(probability_map, key=lambda k: float(probability_map[k]))
17
18
 
18
19
 
20
+ class ScalarPrediction(BaseModel):
21
+ is_predictable: bool = True
22
+ outcome_prediction: t.Optional[ScalarProbabilisticAnswer] = None
23
+
24
+ time: t.Optional[float] = None
25
+ cost: t.Optional[float] = None
26
+
27
+ @property
28
+ def is_answered(self) -> bool:
29
+ return self.outcome_prediction is not None
30
+
31
+
19
32
  class Prediction(BaseModel):
20
33
  is_predictable: bool = True
21
34
  outcome_prediction: t.Optional[CategoricalProbabilisticAnswer] = None
@@ -2,3 +2,4 @@ from prediction_market_agent_tooling.gtypes import ChainID
2
2
 
3
3
  ETHEREUM_ID = ChainID(1)
4
4
  GNOSIS_CHAIN_ID = ChainID(100)
5
+ POLYGON_CHAIN_ID = ChainID(137)