prediction-market-agent-tooling 0.57.11.dev256__py3-none-any.whl → 0.57.11.dev259__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.
@@ -0,0 +1,287 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "approve",
5
+ "inputs": [
6
+ {
7
+ "name": "to",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ },
11
+ {
12
+ "name": "tokenId",
13
+ "type": "uint256",
14
+ "internalType": "uint256"
15
+ }
16
+ ],
17
+ "outputs": [],
18
+ "stateMutability": "nonpayable"
19
+ },
20
+ {
21
+ "type": "function",
22
+ "name": "balanceOf",
23
+ "inputs": [
24
+ {
25
+ "name": "owner",
26
+ "type": "address",
27
+ "internalType": "address"
28
+ }
29
+ ],
30
+ "outputs": [
31
+ {
32
+ "name": "balance",
33
+ "type": "uint256",
34
+ "internalType": "uint256"
35
+ }
36
+ ],
37
+ "stateMutability": "view"
38
+ },
39
+ {
40
+ "type": "function",
41
+ "name": "getApproved",
42
+ "inputs": [
43
+ {
44
+ "name": "tokenId",
45
+ "type": "uint256",
46
+ "internalType": "uint256"
47
+ }
48
+ ],
49
+ "outputs": [
50
+ {
51
+ "name": "operator",
52
+ "type": "address",
53
+ "internalType": "address"
54
+ }
55
+ ],
56
+ "stateMutability": "view"
57
+ },
58
+ {
59
+ "type": "function",
60
+ "name": "isApprovedForAll",
61
+ "inputs": [
62
+ {
63
+ "name": "owner",
64
+ "type": "address",
65
+ "internalType": "address"
66
+ },
67
+ {
68
+ "name": "operator",
69
+ "type": "address",
70
+ "internalType": "address"
71
+ }
72
+ ],
73
+ "outputs": [
74
+ {
75
+ "name": "",
76
+ "type": "bool",
77
+ "internalType": "bool"
78
+ }
79
+ ],
80
+ "stateMutability": "view"
81
+ },
82
+ {
83
+ "type": "function",
84
+ "name": "ownerOf",
85
+ "inputs": [
86
+ {
87
+ "name": "tokenId",
88
+ "type": "uint256",
89
+ "internalType": "uint256"
90
+ }
91
+ ],
92
+ "outputs": [
93
+ {
94
+ "name": "owner",
95
+ "type": "address",
96
+ "internalType": "address"
97
+ }
98
+ ],
99
+ "stateMutability": "view"
100
+ },
101
+ {
102
+ "type": "function",
103
+ "name": "safeTransferFrom",
104
+ "inputs": [
105
+ {
106
+ "name": "from",
107
+ "type": "address",
108
+ "internalType": "address"
109
+ },
110
+ {
111
+ "name": "to",
112
+ "type": "address",
113
+ "internalType": "address"
114
+ },
115
+ {
116
+ "name": "tokenId",
117
+ "type": "uint256",
118
+ "internalType": "uint256"
119
+ }
120
+ ],
121
+ "outputs": [],
122
+ "stateMutability": "nonpayable"
123
+ },
124
+ {
125
+ "type": "function",
126
+ "name": "safeTransferFrom",
127
+ "inputs": [
128
+ {
129
+ "name": "from",
130
+ "type": "address",
131
+ "internalType": "address"
132
+ },
133
+ {
134
+ "name": "to",
135
+ "type": "address",
136
+ "internalType": "address"
137
+ },
138
+ {
139
+ "name": "tokenId",
140
+ "type": "uint256",
141
+ "internalType": "uint256"
142
+ },
143
+ {
144
+ "name": "data",
145
+ "type": "bytes",
146
+ "internalType": "bytes"
147
+ }
148
+ ],
149
+ "outputs": [],
150
+ "stateMutability": "nonpayable"
151
+ },
152
+ {
153
+ "type": "function",
154
+ "name": "setApprovalForAll",
155
+ "inputs": [
156
+ {
157
+ "name": "operator",
158
+ "type": "address",
159
+ "internalType": "address"
160
+ },
161
+ {
162
+ "name": "approved",
163
+ "type": "bool",
164
+ "internalType": "bool"
165
+ }
166
+ ],
167
+ "outputs": [],
168
+ "stateMutability": "nonpayable"
169
+ },
170
+ {
171
+ "type": "function",
172
+ "name": "supportsInterface",
173
+ "inputs": [
174
+ {
175
+ "name": "interfaceId",
176
+ "type": "bytes4",
177
+ "internalType": "bytes4"
178
+ }
179
+ ],
180
+ "outputs": [
181
+ {
182
+ "name": "",
183
+ "type": "bool",
184
+ "internalType": "bool"
185
+ }
186
+ ],
187
+ "stateMutability": "view"
188
+ },
189
+ {
190
+ "type": "function",
191
+ "name": "transferFrom",
192
+ "inputs": [
193
+ {
194
+ "name": "from",
195
+ "type": "address",
196
+ "internalType": "address"
197
+ },
198
+ {
199
+ "name": "to",
200
+ "type": "address",
201
+ "internalType": "address"
202
+ },
203
+ {
204
+ "name": "tokenId",
205
+ "type": "uint256",
206
+ "internalType": "uint256"
207
+ }
208
+ ],
209
+ "outputs": [],
210
+ "stateMutability": "nonpayable"
211
+ },
212
+ {
213
+ "type": "event",
214
+ "name": "Approval",
215
+ "inputs": [
216
+ {
217
+ "name": "owner",
218
+ "type": "address",
219
+ "indexed": true,
220
+ "internalType": "address"
221
+ },
222
+ {
223
+ "name": "approved",
224
+ "type": "address",
225
+ "indexed": true,
226
+ "internalType": "address"
227
+ },
228
+ {
229
+ "name": "tokenId",
230
+ "type": "uint256",
231
+ "indexed": true,
232
+ "internalType": "uint256"
233
+ }
234
+ ],
235
+ "anonymous": false
236
+ },
237
+ {
238
+ "type": "event",
239
+ "name": "ApprovalForAll",
240
+ "inputs": [
241
+ {
242
+ "name": "owner",
243
+ "type": "address",
244
+ "indexed": true,
245
+ "internalType": "address"
246
+ },
247
+ {
248
+ "name": "operator",
249
+ "type": "address",
250
+ "indexed": true,
251
+ "internalType": "address"
252
+ },
253
+ {
254
+ "name": "approved",
255
+ "type": "bool",
256
+ "indexed": false,
257
+ "internalType": "bool"
258
+ }
259
+ ],
260
+ "anonymous": false
261
+ },
262
+ {
263
+ "type": "event",
264
+ "name": "Transfer",
265
+ "inputs": [
266
+ {
267
+ "name": "from",
268
+ "type": "address",
269
+ "indexed": true,
270
+ "internalType": "address"
271
+ },
272
+ {
273
+ "name": "to",
274
+ "type": "address",
275
+ "indexed": true,
276
+ "internalType": "address"
277
+ },
278
+ {
279
+ "name": "tokenId",
280
+ "type": "uint256",
281
+ "indexed": true,
282
+ "internalType": "uint256"
283
+ }
284
+ ],
285
+ "anonymous": false
286
+ }
287
+ ]
@@ -0,0 +1,76 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "owner",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "address",
10
+ "internalType": "address"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "renounceOwnership",
18
+ "inputs": [],
19
+ "outputs": [],
20
+ "stateMutability": "nonpayable"
21
+ },
22
+ {
23
+ "type": "function",
24
+ "name": "transferOwnership",
25
+ "inputs": [
26
+ {
27
+ "name": "newOwner",
28
+ "type": "address",
29
+ "internalType": "address"
30
+ }
31
+ ],
32
+ "outputs": [],
33
+ "stateMutability": "nonpayable"
34
+ },
35
+ {
36
+ "type": "event",
37
+ "name": "OwnershipTransferred",
38
+ "inputs": [
39
+ {
40
+ "name": "previousOwner",
41
+ "type": "address",
42
+ "indexed": true,
43
+ "internalType": "address"
44
+ },
45
+ {
46
+ "name": "newOwner",
47
+ "type": "address",
48
+ "indexed": true,
49
+ "internalType": "address"
50
+ }
51
+ ],
52
+ "anonymous": false
53
+ },
54
+ {
55
+ "type": "error",
56
+ "name": "OwnableInvalidOwner",
57
+ "inputs": [
58
+ {
59
+ "name": "owner",
60
+ "type": "address",
61
+ "internalType": "address"
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ "type": "error",
67
+ "name": "OwnableUnauthorizedAccount",
68
+ "inputs": [
69
+ {
70
+ "name": "account",
71
+ "type": "address",
72
+ "internalType": "address"
73
+ }
74
+ ]
75
+ }
76
+ ]
@@ -78,6 +78,11 @@ class ContractBaseClass(BaseModel):
78
78
  {}
79
79
  ) # 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.
80
80
 
81
+ @classmethod
82
+ def merge_contract_abis(cls, contracts: list["ContractBaseClass"]) -> ABI:
83
+ merged_abi = sum((json.loads(contract.abi) for contract in contracts), [])
84
+ return abi_field_validator(json.dumps(merged_abi))
85
+
81
86
  def get_web3_contract(self, web3: Web3 | None = None) -> Web3Contract:
82
87
  web3 = web3 or self.get_web3()
83
88
  return web3.eth.contract(address=self.address, abi=self.abi)
@@ -391,6 +396,13 @@ class ContractERC4626BaseClass(ContractERC20BaseClass):
391
396
 
392
397
 
393
398
  class OwnableContract(ContractBaseClass):
399
+ abi: ABI = abi_field_validator(
400
+ os.path.join(
401
+ os.path.dirname(os.path.realpath(__file__)),
402
+ "../abis/ownable.abi.json",
403
+ )
404
+ )
405
+
394
406
  def owner(self, web3: Web3 | None = None) -> ChecksumAddress:
395
407
  owner = Web3.to_checksum_address(self.call("owner", web3=web3))
396
408
  return owner
@@ -400,7 +412,7 @@ class ContractERC721BaseClass(ContractBaseClass):
400
412
  abi: ABI = abi_field_validator(
401
413
  os.path.join(
402
414
  os.path.dirname(os.path.realpath(__file__)),
403
- "../abis/ownable_erc721.abi.json",
415
+ "../abis/erc721.abi.json",
404
416
  )
405
417
  )
406
418
 
@@ -458,7 +470,9 @@ class ContractERC721BaseClass(ContractBaseClass):
458
470
 
459
471
 
460
472
  class ContractOwnableERC721BaseClass(ContractERC721BaseClass, OwnableContract):
461
- pass
473
+ abi: ABI = ContractBaseClass.merge_contract_abis(
474
+ [ContractERC721BaseClass(address=""), OwnableContract(address="")]
475
+ )
462
476
 
463
477
 
464
478
  class ContractOnGnosisChain(ContractBaseClass):
@@ -571,11 +585,13 @@ class SimpleTreasuryContract(ContractOnGnosisChain, OwnableContract):
571
585
  def set_required_nft_balance(
572
586
  self,
573
587
  api_keys: APIKeys,
588
+ new_required_balance: int,
574
589
  web3: Web3 | None = None,
575
590
  ) -> TxReceipt:
576
591
  return self.send(
577
592
  api_keys=api_keys,
578
593
  function_name="setRequiredNFTBalance",
594
+ function_params=[new_required_balance],
579
595
  web3=web3,
580
596
  )
581
597
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.57.11.dev256
3
+ Version: 0.57.11.dev259
4
4
  Summary: Tools to benchmark, deploy and monitor prediction market agents.
5
5
  Author: Gnosis
6
6
  Requires-Python: >=3.10,<3.13
@@ -3,6 +3,7 @@ prediction_market_agent_tooling/abis/debuggingcontract.abi.json,sha256=KdkCWmif_
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
5
5
  prediction_market_agent_tooling/abis/erc4626.abi.json,sha256=qvmonhj3tJU5flR4pJjXCSSwB8tgEiJcx4Sc5ilQ5VY,17801
6
+ prediction_market_agent_tooling/abis/erc721.abi.json,sha256=sslrlTfLAkHA7cAJAaAHmGBSsY8_3K6jNK-2OoPUTPs,5396
6
7
  prediction_market_agent_tooling/abis/omen_agentresultmapping.abi.json,sha256=TVWP5J6RO8mb1YpI-RA2iCgeCqGfrIw0OfbHngekTSs,5769
7
8
  prediction_market_agent_tooling/abis/omen_dxdao.abi.json,sha256=Z1kD1QfgYfGwsZEI2UFDNEGZ4hMOix3HGICk8xlO4Ds,9578
8
9
  prediction_market_agent_tooling/abis/omen_fpmm.abi.json,sha256=CDib_b5PVj4m0JBVCB20cTshiVx8st1Be-7E460qFoY,11406
@@ -12,6 +13,7 @@ prediction_market_agent_tooling/abis/omen_kleros.abi.json,sha256=QPMXrYA5UCo_wVU
12
13
  prediction_market_agent_tooling/abis/omen_oracle.abi.json,sha256=YPZ-FLvd4PA9pYd6d5mQI1TD11JnsE0LGxH4XcZZFCA,1775
13
14
  prediction_market_agent_tooling/abis/omen_realitio.abi.json,sha256=7HmFkBF_rq83UTaH2kRRsEfc_WZuf4n-qvkB4nhvweo,15953
14
15
  prediction_market_agent_tooling/abis/omen_thumbnailmapping.abi.json,sha256=u1-3B8FB3Ys9KVJCH-lw9ArkicdxbNMf34dV-VEGMMU,930
16
+ prediction_market_agent_tooling/abis/ownable.abi.json,sha256=DeTy_7VmsMhFl7jwI8MIlmjy2jORauYxrGm7wC_Alxw,1528
15
17
  prediction_market_agent_tooling/abis/ownable_erc721.abi.json,sha256=9sxm588MAQmqCV_S0D3eYC7l9grbeALsd0Da_AHxdEI,8506
16
18
  prediction_market_agent_tooling/abis/proxy.abi.json,sha256=h24GXZ6Q0bSZlwh7zOv0EiDvbqUz_PHtWfKHTyPJ1w4,644
17
19
  prediction_market_agent_tooling/abis/simpletreasury.abi.json,sha256=7-l7rntLkcFKkoN8hXywO0-h-mUZxOZlyQg1Jk7yTB0,2877
@@ -78,7 +80,7 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci
78
80
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=aafau_n_AUbLIwkyIRiTPgKB0dmM0767mSqyPDLF2A4,10576
79
81
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
80
82
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=upSXN5__rmRlzJ6tv1h7FodKzJu9eCkFrN_zeuwroJM,2151
81
- prediction_market_agent_tooling/tools/contract.py,sha256=jNtWxg1oIoV6C108Pdcx4Fj44u8UcMFphnZRIUZjsZM,28664
83
+ prediction_market_agent_tooling/tools/contract.py,sha256=IPc5O9D41SI7UHimy200E5DRCxsOKKWzLcYIcNmzYmc,29280
82
84
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
83
85
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
84
86
  prediction_market_agent_tooling/tools/data_models.py,sha256=jDQ7FU0QQhXlcgJh5VZZGwDTYP2OPAqKPHZFewCPAUY,732
@@ -107,8 +109,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYT
107
109
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
108
110
  prediction_market_agent_tooling/tools/utils.py,sha256=WvuUCHgMCiMq8_wMm5PHNwvLhcdDk2zGKaAM8OUC-qY,6438
109
111
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=wqUDCed3iNrn1Wao1iwGN6tzIrhpzrTRj319wlveJEo,12275
110
- prediction_market_agent_tooling-0.57.11.dev256.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
111
- prediction_market_agent_tooling-0.57.11.dev256.dist-info/METADATA,sha256=NmbrrSR3sH4IzY9ND6QIvX3XXaSo_VqMdxDPaJceO2A,8247
112
- prediction_market_agent_tooling-0.57.11.dev256.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
113
- prediction_market_agent_tooling-0.57.11.dev256.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
114
- prediction_market_agent_tooling-0.57.11.dev256.dist-info/RECORD,,
112
+ prediction_market_agent_tooling-0.57.11.dev259.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
113
+ prediction_market_agent_tooling-0.57.11.dev259.dist-info/METADATA,sha256=JrUhYVQ4jO_ZcWQBbvLIohftpTe2Y4iFY3rFyVRBs3I,8247
114
+ prediction_market_agent_tooling-0.57.11.dev259.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
115
+ prediction_market_agent_tooling-0.57.11.dev259.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
116
+ prediction_market_agent_tooling-0.57.11.dev259.dist-info/RECORD,,