prediction-market-agent-tooling 0.57.11.dev258__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,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
@@ -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.dev258
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
@@ -13,6 +13,7 @@ prediction_market_agent_tooling/abis/omen_kleros.abi.json,sha256=QPMXrYA5UCo_wVU
13
13
  prediction_market_agent_tooling/abis/omen_oracle.abi.json,sha256=YPZ-FLvd4PA9pYd6d5mQI1TD11JnsE0LGxH4XcZZFCA,1775
14
14
  prediction_market_agent_tooling/abis/omen_realitio.abi.json,sha256=7HmFkBF_rq83UTaH2kRRsEfc_WZuf4n-qvkB4nhvweo,15953
15
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
16
17
  prediction_market_agent_tooling/abis/ownable_erc721.abi.json,sha256=9sxm588MAQmqCV_S0D3eYC7l9grbeALsd0Da_AHxdEI,8506
17
18
  prediction_market_agent_tooling/abis/proxy.abi.json,sha256=h24GXZ6Q0bSZlwh7zOv0EiDvbqUz_PHtWfKHTyPJ1w4,644
18
19
  prediction_market_agent_tooling/abis/simpletreasury.abi.json,sha256=7-l7rntLkcFKkoN8hXywO0-h-mUZxOZlyQg1Jk7yTB0,2877
@@ -79,7 +80,7 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci
79
80
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=aafau_n_AUbLIwkyIRiTPgKB0dmM0767mSqyPDLF2A4,10576
80
81
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
81
82
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=upSXN5__rmRlzJ6tv1h7FodKzJu9eCkFrN_zeuwroJM,2151
82
- prediction_market_agent_tooling/tools/contract.py,sha256=Z3SHsC68iFj8GhU6YsFf7kqB13zKJPUvawEkvPj3B1c,28656
83
+ prediction_market_agent_tooling/tools/contract.py,sha256=IPc5O9D41SI7UHimy200E5DRCxsOKKWzLcYIcNmzYmc,29280
83
84
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
84
85
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
85
86
  prediction_market_agent_tooling/tools/data_models.py,sha256=jDQ7FU0QQhXlcgJh5VZZGwDTYP2OPAqKPHZFewCPAUY,732
@@ -108,8 +109,8 @@ prediction_market_agent_tooling/tools/tavily/tavily_search.py,sha256=Kw2mXNkMTYT
108
109
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
109
110
  prediction_market_agent_tooling/tools/utils.py,sha256=WvuUCHgMCiMq8_wMm5PHNwvLhcdDk2zGKaAM8OUC-qY,6438
110
111
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=wqUDCed3iNrn1Wao1iwGN6tzIrhpzrTRj319wlveJEo,12275
111
- prediction_market_agent_tooling-0.57.11.dev258.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
112
- prediction_market_agent_tooling-0.57.11.dev258.dist-info/METADATA,sha256=KVhSn5v8Q0-GqYQPCMiJyKb10SqKtPqz5HzaMIpaG_o,8247
113
- prediction_market_agent_tooling-0.57.11.dev258.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
114
- prediction_market_agent_tooling-0.57.11.dev258.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
115
- prediction_market_agent_tooling-0.57.11.dev258.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,,