prediction-market-agent-tooling 0.58.5__py3-none-any.whl → 0.59.0.dev399__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.
@@ -18,16 +18,12 @@ from prediction_market_agent_tooling.gtypes import (
18
18
  TxParams,
19
19
  TxReceipt,
20
20
  Wei,
21
- xDai,
22
21
  )
23
- from prediction_market_agent_tooling.tools.data_models import MessageContainer
24
- from prediction_market_agent_tooling.tools.hexbytes_custom import HexBytes
25
- from prediction_market_agent_tooling.tools.utils import BPS_CONSTANT, DatetimeUTC
22
+ from prediction_market_agent_tooling.tools.utils import DatetimeUTC
26
23
  from prediction_market_agent_tooling.tools.web3_utils import (
27
24
  call_function_on_contract,
28
25
  send_function_on_contract_tx,
29
26
  send_function_on_contract_tx_using_safe,
30
- wei_to_xdai,
31
27
  )
32
28
 
33
29
 
@@ -568,170 +564,6 @@ class DebuggingContract(ContractOnGnosisChain):
568
564
  )
569
565
 
570
566
 
571
- class SimpleTreasuryContract(ContractOnGnosisChain, OwnableContract):
572
- # Contract ABI taken from built https://github.com/gnosis/labs-contracts.
573
- abi: ABI = abi_field_validator(
574
- os.path.join(
575
- os.path.dirname(os.path.realpath(__file__)),
576
- "../abis/simpletreasury.abi.json",
577
- )
578
- )
579
-
580
- address: ChecksumAddress = Web3.to_checksum_address(
581
- "0x624ad0db52e6b18afb4d36b8e79d0c2a74f3fc8a"
582
- )
583
-
584
- def required_nft_balance(self, web3: Web3 | None = None) -> int:
585
- min_num_of_nfts: int = self.call("requiredNFTBalance", web3=web3)
586
- return min_num_of_nfts
587
-
588
- def set_required_nft_balance(
589
- self,
590
- api_keys: APIKeys,
591
- new_required_balance: int,
592
- web3: Web3 | None = None,
593
- ) -> TxReceipt:
594
- return self.send(
595
- api_keys=api_keys,
596
- function_name="setRequiredNFTBalance",
597
- function_params=[new_required_balance],
598
- web3=web3,
599
- )
600
-
601
- def nft_contract(self, web3: Web3 | None = None) -> ContractERC721BaseClass:
602
- nft_contract_address: ChecksumAddress = self.call("nftContract", web3=web3)
603
- contract = ContractERC721BaseClass(address=nft_contract_address)
604
- return contract
605
-
606
- def withdraw(
607
- self,
608
- api_keys: APIKeys,
609
- web3: Web3 | None = None,
610
- ) -> TxReceipt:
611
- return self.send(
612
- api_keys=api_keys,
613
- function_name="withdraw",
614
- web3=web3,
615
- )
616
-
617
-
618
- class AgentCommunicationContract(ContractOnGnosisChain, OwnableContract):
619
- # Contract ABI taken from built https://github.com/gnosis/labs-contracts.
620
- abi: ABI = abi_field_validator(
621
- os.path.join(
622
- os.path.dirname(os.path.realpath(__file__)),
623
- "../abis/agentcommunication.abi.json",
624
- )
625
- )
626
-
627
- address: ChecksumAddress = Web3.to_checksum_address(
628
- "0xe9dd78FF297DbaAbe5D0E45aE554a4B561935DE9"
629
- )
630
-
631
- def minimum_message_value(self, web3: Web3 | None = None) -> xDai:
632
- value: Wei = self.call("minimumValueForSendingMessageInWei", web3=web3)
633
- return wei_to_xdai(value)
634
-
635
- def ratio_given_to_treasury(self, web3: Web3 | None = None) -> float:
636
- bps: int = self.call("pctToTreasuryInBasisPoints", web3=web3)
637
- return bps / BPS_CONSTANT
638
-
639
- def count_unseen_messages(
640
- self,
641
- agent_address: ChecksumAddress,
642
- web3: Web3 | None = None,
643
- ) -> int:
644
- unseen_message_count: int = self.call(
645
- "countMessages", function_params=[agent_address], web3=web3
646
- )
647
- return unseen_message_count
648
-
649
- def get_at_index(
650
- self,
651
- agent_address: ChecksumAddress,
652
- idx: int,
653
- web3: Web3 | None = None,
654
- ) -> MessageContainer:
655
- message_container_raw: t.Tuple[t.Any] = self.call(
656
- "getAtIndex", function_params=[agent_address, idx], web3=web3
657
- )
658
- return MessageContainer.from_tuple(message_container_raw)
659
-
660
- def set_treasury_address(
661
- self,
662
- api_keys: APIKeys,
663
- new_treasury_address: ChecksumAddress,
664
- web3: Web3 | None = None,
665
- ) -> TxReceipt:
666
- return self.send(
667
- api_keys=api_keys,
668
- function_name="setTreasuryAddress",
669
- function_params=[new_treasury_address],
670
- web3=web3,
671
- )
672
-
673
- def set_minimum_value_for_sending_message(
674
- self,
675
- api_keys: APIKeys,
676
- new_minimum_value: Wei,
677
- web3: Web3 | None = None,
678
- ) -> TxReceipt:
679
- return self.send(
680
- api_keys=api_keys,
681
- function_name="adjustMinimumValueForSendingMessage",
682
- function_params=[new_minimum_value],
683
- web3=web3,
684
- )
685
-
686
- def pop_message(
687
- self,
688
- api_keys: APIKeys,
689
- agent_address: ChecksumAddress,
690
- index: int = 0,
691
- web3: Web3 | None = None,
692
- ) -> MessageContainer:
693
- """
694
- Retrieves and removes message at specified index from the agent's message queue.
695
-
696
- This method first retrieves the message at the front of the queue without removing it,
697
- allowing us to return the message content directly. The actual removal of the message
698
- from the queue is performed by sending a transaction to the contract, which executes
699
- the `popMessageAtIndex` function. The transaction receipt is not used to obtain the message
700
- content, as it only contains event data, not the returned struct.
701
- """
702
-
703
- # Peek the element before popping.
704
- message_container = self.get_at_index(
705
- agent_address=agent_address, idx=index, web3=web3
706
- )
707
-
708
- # Next, pop that element and discard the transaction receipt.
709
- self.send(
710
- api_keys=api_keys,
711
- function_name="popMessageAtIndex",
712
- function_params=[agent_address, index],
713
- web3=web3,
714
- )
715
-
716
- return message_container
717
-
718
- def send_message(
719
- self,
720
- api_keys: APIKeys,
721
- agent_address: ChecksumAddress,
722
- message: HexBytes,
723
- amount_wei: Wei,
724
- web3: Web3 | None = None,
725
- ) -> TxReceipt:
726
- return self.send_with_value(
727
- api_keys=api_keys,
728
- function_name="sendMessage",
729
- amount_wei=amount_wei,
730
- function_params=[agent_address, message],
731
- web3=web3,
732
- )
733
-
734
-
735
567
  def contract_implements_function(
736
568
  contract_address: ChecksumAddress,
737
569
  function_name: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: prediction-market-agent-tooling
3
- Version: 0.58.5
3
+ Version: 0.59.0.dev399
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,3 @@
1
- prediction_market_agent_tooling/abis/agentcommunication.abi.json,sha256=Go6blKVORPuViDkxw_vqFzcpRH5i2qHje9R1wILDqM8,5817
2
1
  prediction_market_agent_tooling/abis/debuggingcontract.abi.json,sha256=KdkCWmif_WO421RFKhc03kGJiccFqsxsZNrgCd8EH_4,571
3
2
  prediction_market_agent_tooling/abis/depositablewrapper_erc20.abi.json,sha256=m0Wk3uQyLM8apWRRvX4d3u1d77bWVuXfV38D-aV48t0,4612
4
3
  prediction_market_agent_tooling/abis/erc20.abi.json,sha256=b8t6tPUhjBo5dHFq8ipsK-ih_g29dOTbWI0GBZiEWL8,3685
@@ -17,7 +16,6 @@ prediction_market_agent_tooling/abis/ownable.abi.json,sha256=DeTy_7VmsMhFl7jwI8M
17
16
  prediction_market_agent_tooling/abis/ownable_erc721.abi.json,sha256=9sxm588MAQmqCV_S0D3eYC7l9grbeALsd0Da_AHxdEI,8506
18
17
  prediction_market_agent_tooling/abis/proxy.abi.json,sha256=h24GXZ6Q0bSZlwh7zOv0EiDvbqUz_PHtWfKHTyPJ1w4,644
19
18
  prediction_market_agent_tooling/abis/seer_market_factory.abi.json,sha256=g7RVxZVUWlTXIgTV2W6kO4twQM909Qv58zAr7Dk4XIc,13553
20
- prediction_market_agent_tooling/abis/simpletreasury.abi.json,sha256=7-l7rntLkcFKkoN8hXywO0-h-mUZxOZlyQg1Jk7yTB0,2877
21
19
  prediction_market_agent_tooling/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
20
  prediction_market_agent_tooling/benchmark/agents.py,sha256=B1-uWdyeN4GGKMWGK_-CcAFJg1m9Y_XuaeIHPB29QR8,3971
23
21
  prediction_market_agent_tooling/benchmark/benchmark.py,sha256=MqTiaaJ3cYiOLUVR7OyImLWxcEya3Rl5JyFYW-K0lwM,17097
@@ -85,12 +83,11 @@ prediction_market_agent_tooling/tools/betting_strategies/utils.py,sha256=kpIb-ci
85
83
  prediction_market_agent_tooling/tools/caches/db_cache.py,sha256=aafau_n_AUbLIwkyIRiTPgKB0dmM0767mSqyPDLF2A4,10576
86
84
  prediction_market_agent_tooling/tools/caches/inmemory_cache.py,sha256=ZW5iI5rmjqeAebu5T7ftRnlkxiL02IC-MxCfDB80x7w,1506
87
85
  prediction_market_agent_tooling/tools/caches/serializers.py,sha256=vFDx4fsPxclXp2q0sv27j4al_M_Tj9aR2JJP-xNHQXA,2151
88
- prediction_market_agent_tooling/tools/contract.py,sha256=JkkrXm75_XUZ33jVlXF7v-Ge9RLSfXQeY523H_kuThQ,26069
86
+ prediction_market_agent_tooling/tools/contract.py,sha256=gmSuANqlfwldFG7hc4uom0q1Z-mo40qfYh5TDUKLFTs,20518
89
87
  prediction_market_agent_tooling/tools/costs.py,sha256=EaAJ7v9laD4VEV3d8B44M4u3_oEO_H16jRVCdoZ93Uw,954
90
88
  prediction_market_agent_tooling/tools/cow/cow_manager.py,sha256=WK6Uk722VotjLHtxDPHxvwBrWVb3rvTegg_3w58ehwU,3869
91
89
  prediction_market_agent_tooling/tools/cow/cow_order.py,sha256=ohriN_65BZ69f_BV6bNg_AwZjidip4yi4d2G6Ddy5Qg,4238
92
90
  prediction_market_agent_tooling/tools/custom_exceptions.py,sha256=Fh8z1fbwONvP4-j7AmV_PuEcoqb6-QXa9PJ9m7guMcM,93
93
- prediction_market_agent_tooling/tools/data_models.py,sha256=jDQ7FU0QQhXlcgJh5VZZGwDTYP2OPAqKPHZFewCPAUY,732
94
91
  prediction_market_agent_tooling/tools/datetime_utc.py,sha256=8_WackjtjC8zHXrhQFTGQ6e6Fz_6llWoKR4CSFvIv9I,2766
95
92
  prediction_market_agent_tooling/tools/db/db_manager.py,sha256=GtzHH1NLl8HwqC8Z7s6eTlIQXuV0blxfaV2PeQrBnfQ,3013
96
93
  prediction_market_agent_tooling/tools/google_utils.py,sha256=t3_UEEvKX3L0biSIQ560GdRbllQ6eprhK_upE243A-0,3185
@@ -120,8 +117,8 @@ prediction_market_agent_tooling/tools/tokens/main_token.py,sha256=5iHO7-iehSlXuu
120
117
  prediction_market_agent_tooling/tools/transaction_cache.py,sha256=K5YKNL2_tR10Iw2TD9fuP-CTGpBbZtNdgbd0B_R7pjg,1814
121
118
  prediction_market_agent_tooling/tools/utils.py,sha256=jLG4nbEoIzzJiZ4RgMx4Q969Zdl0p0s63p8uET_0Fuw,6440
122
119
  prediction_market_agent_tooling/tools/web3_utils.py,sha256=e7lqqQddVZaa905rhBb6L1fC3o39Yr-PDJsJjHFBeRE,12523
123
- prediction_market_agent_tooling-0.58.5.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
124
- prediction_market_agent_tooling-0.58.5.dist-info/METADATA,sha256=rPCTjBMlKpKZHpIpANRKiO-FIZRUqMA_P0DUcps9pcI,8629
125
- prediction_market_agent_tooling-0.58.5.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
126
- prediction_market_agent_tooling-0.58.5.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
127
- prediction_market_agent_tooling-0.58.5.dist-info/RECORD,,
120
+ prediction_market_agent_tooling-0.59.0.dev399.dist-info/LICENSE,sha256=6or154nLLU6bELzjh0mCreFjt0m2v72zLi3yHE0QbeE,7650
121
+ prediction_market_agent_tooling-0.59.0.dev399.dist-info/METADATA,sha256=2hdm2FPByw4iA2un7-to2JRnrvo-pOV6PHz8lkG61zE,8636
122
+ prediction_market_agent_tooling-0.59.0.dev399.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
123
+ prediction_market_agent_tooling-0.59.0.dev399.dist-info/entry_points.txt,sha256=m8PukHbeH5g0IAAmOf_1Ahm-sGAMdhSSRQmwtpmi2s8,81
124
+ prediction_market_agent_tooling-0.59.0.dev399.dist-info/RECORD,,
@@ -1,224 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- {
5
- "internalType": "address payable",
6
- "name": "_treasury",
7
- "type": "address"
8
- },
9
- {
10
- "internalType": "uint256",
11
- "name": "_pctToTreasuryInBasisPoints",
12
- "type": "uint256"
13
- }
14
- ],
15
- "stateMutability": "nonpayable",
16
- "type": "constructor"
17
- },
18
- { "inputs": [], "name": "MessageNotSentByAgent", "type": "error" },
19
- {
20
- "inputs": [
21
- { "internalType": "address", "name": "owner", "type": "address" }
22
- ],
23
- "name": "OwnableInvalidOwner",
24
- "type": "error"
25
- },
26
- {
27
- "inputs": [
28
- { "internalType": "address", "name": "account", "type": "address" }
29
- ],
30
- "name": "OwnableUnauthorizedAccount",
31
- "type": "error"
32
- },
33
- {
34
- "anonymous": false,
35
- "inputs": [
36
- {
37
- "indexed": true,
38
- "internalType": "address",
39
- "name": "sender",
40
- "type": "address"
41
- },
42
- {
43
- "indexed": true,
44
- "internalType": "address",
45
- "name": "agentAddress",
46
- "type": "address"
47
- },
48
- {
49
- "indexed": false,
50
- "internalType": "bytes",
51
- "name": "message",
52
- "type": "bytes"
53
- },
54
- {
55
- "indexed": false,
56
- "internalType": "uint256",
57
- "name": "value",
58
- "type": "uint256"
59
- }
60
- ],
61
- "name": "LogMessage",
62
- "type": "event"
63
- },
64
- {
65
- "anonymous": false,
66
- "inputs": [
67
- {
68
- "indexed": true,
69
- "internalType": "address",
70
- "name": "previousOwner",
71
- "type": "address"
72
- },
73
- {
74
- "indexed": true,
75
- "internalType": "address",
76
- "name": "newOwner",
77
- "type": "address"
78
- }
79
- ],
80
- "name": "OwnershipTransferred",
81
- "type": "event"
82
- },
83
- {
84
- "inputs": [
85
- { "internalType": "uint256", "name": "newValue", "type": "uint256" }
86
- ],
87
- "name": "adjustMinimumValueForSendingMessage",
88
- "outputs": [],
89
- "stateMutability": "nonpayable",
90
- "type": "function"
91
- },
92
- {
93
- "inputs": [
94
- { "internalType": "address", "name": "agentAddress", "type": "address" }
95
- ],
96
- "name": "countMessages",
97
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
98
- "stateMutability": "view",
99
- "type": "function"
100
- },
101
- {
102
- "inputs": [
103
- { "internalType": "address", "name": "agentAddress", "type": "address" },
104
- { "internalType": "uint256", "name": "idx", "type": "uint256" }
105
- ],
106
- "name": "getAtIndex",
107
- "outputs": [
108
- {
109
- "components": [
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" }
114
- ],
115
- "internalType": "struct DoubleEndedStructQueue.MessageContainer",
116
- "name": "",
117
- "type": "tuple"
118
- }
119
- ],
120
- "stateMutability": "view",
121
- "type": "function"
122
- },
123
- {
124
- "inputs": [],
125
- "name": "minimumValueForSendingMessageInWei",
126
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
127
- "stateMutability": "view",
128
- "type": "function"
129
- },
130
- {
131
- "inputs": [],
132
- "name": "owner",
133
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
134
- "stateMutability": "view",
135
- "type": "function"
136
- },
137
- {
138
- "inputs": [],
139
- "name": "pctToTreasuryInBasisPoints",
140
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
141
- "stateMutability": "view",
142
- "type": "function"
143
- },
144
- {
145
- "inputs": [
146
- { "internalType": "address", "name": "agentAddress", "type": "address" },
147
- { "internalType": "uint256", "name": "idx", "type": "uint256" }
148
- ],
149
- "name": "popMessageAtIndex",
150
- "outputs": [
151
- {
152
- "components": [
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" }
157
- ],
158
- "internalType": "struct DoubleEndedStructQueue.MessageContainer",
159
- "name": "",
160
- "type": "tuple"
161
- }
162
- ],
163
- "stateMutability": "nonpayable",
164
- "type": "function"
165
- },
166
- {
167
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
168
- "name": "queues",
169
- "outputs": [
170
- { "internalType": "uint128", "name": "_begin", "type": "uint128" },
171
- { "internalType": "uint128", "name": "_end", "type": "uint128" }
172
- ],
173
- "stateMutability": "view",
174
- "type": "function"
175
- },
176
- {
177
- "inputs": [],
178
- "name": "renounceOwnership",
179
- "outputs": [],
180
- "stateMutability": "nonpayable",
181
- "type": "function"
182
- },
183
- {
184
- "inputs": [
185
- { "internalType": "address", "name": "agentAddress", "type": "address" },
186
- { "internalType": "bytes", "name": "message", "type": "bytes" }
187
- ],
188
- "name": "sendMessage",
189
- "outputs": [],
190
- "stateMutability": "payable",
191
- "type": "function"
192
- },
193
- {
194
- "inputs": [
195
- {
196
- "internalType": "address payable",
197
- "name": "_treasury",
198
- "type": "address"
199
- }
200
- ],
201
- "name": "setTreasuryAddress",
202
- "outputs": [],
203
- "stateMutability": "nonpayable",
204
- "type": "function"
205
- },
206
- {
207
- "inputs": [
208
- { "internalType": "address", "name": "newOwner", "type": "address" }
209
- ],
210
- "name": "transferOwnership",
211
- "outputs": [],
212
- "stateMutability": "nonpayable",
213
- "type": "function"
214
- },
215
- {
216
- "inputs": [],
217
- "name": "treasury",
218
- "outputs": [
219
- { "internalType": "address payable", "name": "", "type": "address" }
220
- ],
221
- "stateMutability": "view",
222
- "type": "function"
223
- }
224
- ]
@@ -1,156 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- {
5
- "internalType": "address",
6
- "name": "_nftContract",
7
- "type": "address"
8
- }
9
- ],
10
- "stateMutability": "nonpayable",
11
- "type": "constructor"
12
- },
13
- {
14
- "inputs": [
15
- {
16
- "internalType": "address",
17
- "name": "owner",
18
- "type": "address"
19
- }
20
- ],
21
- "name": "OwnableInvalidOwner",
22
- "type": "error"
23
- },
24
- {
25
- "inputs": [
26
- {
27
- "internalType": "address",
28
- "name": "account",
29
- "type": "address"
30
- }
31
- ],
32
- "name": "OwnableUnauthorizedAccount",
33
- "type": "error"
34
- },
35
- {
36
- "anonymous": false,
37
- "inputs": [
38
- {
39
- "indexed": true,
40
- "internalType": "address",
41
- "name": "previousOwner",
42
- "type": "address"
43
- },
44
- {
45
- "indexed": true,
46
- "internalType": "address",
47
- "name": "newOwner",
48
- "type": "address"
49
- }
50
- ],
51
- "name": "OwnershipTransferred",
52
- "type": "event"
53
- },
54
- {
55
- "anonymous": false,
56
- "inputs": [
57
- {
58
- "indexed": true,
59
- "internalType": "address",
60
- "name": "holder",
61
- "type": "address"
62
- },
63
- {
64
- "indexed": false,
65
- "internalType": "uint256",
66
- "name": "amount",
67
- "type": "uint256"
68
- }
69
- ],
70
- "name": "WithdrawnByNFTHolder",
71
- "type": "event"
72
- },
73
- {
74
- "inputs": [],
75
- "name": "nftContract",
76
- "outputs": [
77
- {
78
- "internalType": "contract IERC721",
79
- "name": "",
80
- "type": "address"
81
- }
82
- ],
83
- "stateMutability": "view",
84
- "type": "function"
85
- },
86
- {
87
- "inputs": [],
88
- "name": "owner",
89
- "outputs": [
90
- {
91
- "internalType": "address",
92
- "name": "",
93
- "type": "address"
94
- }
95
- ],
96
- "stateMutability": "view",
97
- "type": "function"
98
- },
99
- {
100
- "inputs": [],
101
- "name": "renounceOwnership",
102
- "outputs": [],
103
- "stateMutability": "nonpayable",
104
- "type": "function"
105
- },
106
- {
107
- "inputs": [],
108
- "name": "requiredNFTBalance",
109
- "outputs": [
110
- {
111
- "internalType": "uint256",
112
- "name": "",
113
- "type": "uint256"
114
- }
115
- ],
116
- "stateMutability": "view",
117
- "type": "function"
118
- },
119
- {
120
- "inputs": [
121
- {
122
- "internalType": "uint256",
123
- "name": "_newBalance",
124
- "type": "uint256"
125
- }
126
- ],
127
- "name": "setRequiredNFTBalance",
128
- "outputs": [],
129
- "stateMutability": "nonpayable",
130
- "type": "function"
131
- },
132
- {
133
- "inputs": [
134
- {
135
- "internalType": "address",
136
- "name": "newOwner",
137
- "type": "address"
138
- }
139
- ],
140
- "name": "transferOwnership",
141
- "outputs": [],
142
- "stateMutability": "nonpayable",
143
- "type": "function"
144
- },
145
- {
146
- "inputs": [],
147
- "name": "withdraw",
148
- "outputs": [],
149
- "stateMutability": "nonpayable",
150
- "type": "function"
151
- },
152
- {
153
- "stateMutability": "payable",
154
- "type": "receive"
155
- }
156
- ]
@@ -1,23 +0,0 @@
1
- import typing as t
2
-
3
- from pydantic import BaseModel, ConfigDict, Field
4
-
5
- from prediction_market_agent_tooling.gtypes import ChecksumAddress, HexBytes, Wei
6
-
7
-
8
- # Taken from https://github.com/gnosis/labs-contracts/blob/main/src/NFT/DoubleEndedStructQueue.sol
9
- class MessageContainer(BaseModel):
10
- model_config = ConfigDict(populate_by_name=True)
11
- sender: ChecksumAddress
12
- recipient: ChecksumAddress = Field(alias="agentAddress")
13
- message: HexBytes
14
- value: Wei
15
-
16
- @staticmethod
17
- def from_tuple(values: tuple[t.Any, ...]) -> "MessageContainer":
18
- return MessageContainer(
19
- sender=values[0],
20
- recipient=values[1],
21
- message=HexBytes(values[2]),
22
- value=values[3],
23
- )