mech-client 0.2.20.post1__tar.gz → 0.3.0__tar.gz

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 (53) hide show
  1. {mech_client-0.2.20.post1 → mech_client-0.3.0}/PKG-INFO +48 -4
  2. {mech_client-0.2.20.post1 → mech_client-0.3.0}/README.md +47 -3
  3. mech_client-0.3.0/mech_client/__init__.py +3 -0
  4. mech_client-0.3.0/mech_client/abis/BalanceTrackerFixedPriceNative.json +503 -0
  5. mech_client-0.3.0/mech_client/abis/BalanceTrackerFixedPriceToken.json +502 -0
  6. mech_client-0.3.0/mech_client/abis/BalanceTrackerNvmSubscriptionNative.json +672 -0
  7. mech_client-0.3.0/mech_client/abis/IERC1155.json +295 -0
  8. mech_client-0.3.0/mech_client/abis/IMech.json +165 -0
  9. mech_client-0.3.0/mech_client/abis/IToken.json +880 -0
  10. mech_client-0.3.0/mech_client/abis/MechMarketplace.json +1281 -0
  11. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/cli.py +74 -19
  12. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/configs/mechs.json +16 -4
  13. mech_client-0.3.0/mech_client/fetch_ipfs_hash.py +88 -0
  14. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/__init__.py +13 -3
  15. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/interact.py +24 -2
  16. mech_client-0.3.0/mech_client/marketplace_interact.py +880 -0
  17. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/wss.py +89 -0
  18. {mech_client-0.2.20.post1 → mech_client-0.3.0}/pyproject.toml +1 -1
  19. mech_client-0.2.20.post1/mech_client/__init__.py +0 -3
  20. {mech_client-0.2.20.post1 → mech_client-0.3.0}/LICENSE +0 -0
  21. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/acn.py +0 -0
  22. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/README.md +0 -0
  23. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/__init__.py +0 -0
  24. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/acn.proto +0 -0
  25. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/acn_pb2.py +0 -0
  26. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/custom_types.py +0 -0
  27. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/dialogues.py +0 -0
  28. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/message.py +0 -0
  29. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/protocol.yaml +0 -0
  30. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/serialization.py +0 -0
  31. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/tests/__init__.py +0 -0
  32. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/tests/test_acn.py +0 -0
  33. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/tests/test_acn_dialogues.py +0 -0
  34. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn/tests/test_acn_messages.py +0 -0
  35. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/README.md +0 -0
  36. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/__init__.py +0 -0
  37. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/acn_data_share.proto +0 -0
  38. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/acn_data_share_pb2.py +0 -0
  39. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/dialogues.py +0 -0
  40. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/message.py +0 -0
  41. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/protocol.yaml +0 -0
  42. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/serialization.py +0 -0
  43. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/tests/test_acn_data_share_dialogues.py +0 -0
  44. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/acn_data_share/tests/test_acn_data_share_messages.py +0 -0
  45. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/p2p_libp2p_client/README.md +0 -0
  46. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/p2p_libp2p_client/__init__.py +0 -0
  47. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/p2p_libp2p_client/connection.py +0 -0
  48. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/helpers/p2p_libp2p_client/connection.yaml +0 -0
  49. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/mech_tool_management.py +0 -0
  50. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/prompt_to_ipfs.py +0 -0
  51. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/push_to_ipfs.py +0 -0
  52. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/subgraph.py +0 -0
  53. {mech_client-0.2.20.post1 → mech_client-0.3.0}/mech_client/to_png.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mech-client
3
- Version: 0.2.20.post1
3
+ Version: 0.3.0
4
4
  Summary: Basic client to interact with a mech
5
5
  License: Apache-2.0
6
6
  Author: David Minarsch
@@ -117,14 +117,33 @@ The EOA you use must have enough funds to pay for the Mech requests, or alternat
117
117
 
118
118
  ### Select the mech you are going to send requests to
119
119
 
120
- Mechs are deployed to several networks. Find the list of supported networks and corresponging mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
120
+ Mechs can receive requests via the [Mech Marketplace](https://github.com/valory-xyz/ai-registry-mech/) or directly. We call the last ones _Legacy Mechs_.
121
+ Mechs are deployed on several networks. Find the list of supported networks and corresponding mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs). Additionally, on Gnosis you can find more available Mechs [here](https://mech.olas.network/) (click on the tab "Legacy Mech" in order to see Legacy Mech and "Mech Marketplace" for the ones which receive requests via the Mech Marketplace).
122
+
123
+
124
+ ### API Keys
125
+
126
+ In order to fetch on-chain data for Gnosis and Base, mech client requires an API key from a blockchain data provider. You can find them here for [GnosisScan](https://gnosisscan.io/) and [BaseScan](https://basescan.org/). Follow these steps to generate your API key if you are planning to use mech client for gnosis and base:
127
+
128
+ 1. Sign up or log in
129
+ 2. Go to API Dashboard on the left menu
130
+ 3. Add a new API key
131
+ 4. Once generated copy your API key
132
+
133
+ Once you have your API key, you'll need to configure it in your environment. Use the following command to set it for your environment.
134
+
135
+ ```bash
136
+ export MECHX_API_KEY=<your api key>
137
+ ```
121
138
 
122
139
  ### Generate Mech requests
123
140
 
141
+ #### Legacy Mechs
142
+
124
143
  The basic usage of the Mech Client is as follows:
125
144
 
126
145
  ```bash
127
- mechx interact <prompt> <agent_id>
146
+ mechx interact <prompt> --agent_id <agent_id>
128
147
  ```
129
148
 
130
149
  where agent with `<agent_id>` will process `<prompt>` with the default options. Each chain has its own set of Mech agents. You can find the agent IDs for each chain on the [Mech Hub](https://aimechs.autonolas.network/registry) or on the [Mech repository](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
@@ -163,7 +182,7 @@ Some useful options:
163
182
  Example of a request specifying a key file and tool:
164
183
 
165
184
  ```bash
166
- mechx interact "write a short poem" 6 --key ~/ethereum_private_key.txt --tool openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
185
+ mechx interact "write a short poem" --agent_id 6 --key ~/ethereum_private_key.txt --tool openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
167
186
  ```
168
187
 
169
188
  You will see an output like this:
@@ -178,6 +197,24 @@ Data arrived: https://gateway.autonolas.tech/ipfs/f01701220a462120d5bb03f406fa5e
178
197
  Data from agent: {'requestId': 100407405856633966395081711430940962809568685031934329025999216833965518452765, 'result': "In a world of chaos and strife,\nThere's beauty in the simplest of life.\nA gentle breeze whispers through the trees,\nAnd birds sing melodies with ease.\n\nThe sun sets in a fiery hue,\nPainting the sky in shades of blue.\nStars twinkle in the darkness above,\nGuiding us with their light and love.\n\nSo take a moment to pause and see,\nThe wonders of this world so free.\nEmbrace the joy that each day brings,\nAnd let your heart soar on gentle wings.", 'prompt': 'write a short poem', 'cost_dict': {}, 'metadata': {'model': None, 'tool': 'openai-gpt-3.5-turbo'}}
179
198
  ```
180
199
 
200
+ #### With the Mech Marketplace
201
+
202
+ With the Mech Marketplace, the basic usage of the Mech Client is as follows.
203
+
204
+ ```bash
205
+ mechx interact <prompt> --tool openai-gpt-3.5-turbo --chain-config <chain_config>
206
+ ```
207
+
208
+ To use a custom mech to send requests to, use the `priority-mech` flag while sending the requests
209
+
210
+ ```bash
211
+ mechx interact <prompt> --priority-mech <priority mech address> --tool openai-gpt-3.5-turbo --chain-config <chain_config>
212
+ ```
213
+
214
+ Additionally to other options which are the same as for legacy Mechs, this usage has the following option:
215
+
216
+ `--use-prepaid <bool>`: use the prepaid method to send requests to a Mech via the Mech Marketplace. Defaults to False.
217
+ `--use-offchain <bool>`: use the off-chain method to send requests to a Mech via the Mech Marketplace. Defaults to False.
181
218
 
182
219
  ### List tools available for agents
183
220
 
@@ -289,6 +326,8 @@ Output Schema:
289
326
 
290
327
  ### Chain configuration
291
328
 
329
+ #### For legacy Mechs
330
+
292
331
  Default configurations for different chains are stored in the file [configs/mechs.json](./mech_client/configs/mechs.json). If `--chain-config` parameter is not specified, the Mech Client will choose the first configuration on the JSON.
293
332
 
294
333
  Additionally, you can override any configuration parameter by exporting any of the following environment variables:
@@ -381,6 +420,11 @@ This script will:
381
420
  - Retrieve and display the description of a specific tool using its unique identifier.
382
421
  - Retrieve and display the input and output schema of a specific tool using its unique identifier.
383
422
 
423
+ #### For Mechs receiving requests via the Mech Marketplace
424
+
425
+ In this case, the script is the same, except for the function result. When this function has no argument agent_id,
426
+ the request is sent to the Mech Marketplace. The target Mech to which the request is relayed should be in the chain_config file (key `priority_mech_address`).
427
+
384
428
  ## Developer installation
385
429
 
386
430
  To setup the development environment for this project, clone the repository and run the following commands:
@@ -95,14 +95,33 @@ The EOA you use must have enough funds to pay for the Mech requests, or alternat
95
95
 
96
96
  ### Select the mech you are going to send requests to
97
97
 
98
- Mechs are deployed to several networks. Find the list of supported networks and corresponging mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
98
+ Mechs can receive requests via the [Mech Marketplace](https://github.com/valory-xyz/ai-registry-mech/) or directly. We call the last ones _Legacy Mechs_.
99
+ Mechs are deployed on several networks. Find the list of supported networks and corresponding mech addresses [here](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs). Additionally, on Gnosis you can find more available Mechs [here](https://mech.olas.network/) (click on the tab "Legacy Mech" in order to see Legacy Mech and "Mech Marketplace" for the ones which receive requests via the Mech Marketplace).
100
+
101
+
102
+ ### API Keys
103
+
104
+ In order to fetch on-chain data for Gnosis and Base, mech client requires an API key from a blockchain data provider. You can find them here for [GnosisScan](https://gnosisscan.io/) and [BaseScan](https://basescan.org/). Follow these steps to generate your API key if you are planning to use mech client for gnosis and base:
105
+
106
+ 1. Sign up or log in
107
+ 2. Go to API Dashboard on the left menu
108
+ 3. Add a new API key
109
+ 4. Once generated copy your API key
110
+
111
+ Once you have your API key, you'll need to configure it in your environment. Use the following command to set it for your environment.
112
+
113
+ ```bash
114
+ export MECHX_API_KEY=<your api key>
115
+ ```
99
116
 
100
117
  ### Generate Mech requests
101
118
 
119
+ #### Legacy Mechs
120
+
102
121
  The basic usage of the Mech Client is as follows:
103
122
 
104
123
  ```bash
105
- mechx interact <prompt> <agent_id>
124
+ mechx interact <prompt> --agent_id <agent_id>
106
125
  ```
107
126
 
108
127
  where agent with `<agent_id>` will process `<prompt>` with the default options. Each chain has its own set of Mech agents. You can find the agent IDs for each chain on the [Mech Hub](https://aimechs.autonolas.network/registry) or on the [Mech repository](https://github.com/valory-xyz/mech?tab=readme-ov-file#examples-of-deployed-mechs).
@@ -141,7 +160,7 @@ Some useful options:
141
160
  Example of a request specifying a key file and tool:
142
161
 
143
162
  ```bash
144
- mechx interact "write a short poem" 6 --key ~/ethereum_private_key.txt --tool openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
163
+ mechx interact "write a short poem" --agent_id 6 --key ~/ethereum_private_key.txt --tool openai-gpt-3.5-turbo --chain-config gnosis --confirm on-chain
145
164
  ```
146
165
 
147
166
  You will see an output like this:
@@ -156,6 +175,24 @@ Data arrived: https://gateway.autonolas.tech/ipfs/f01701220a462120d5bb03f406fa5e
156
175
  Data from agent: {'requestId': 100407405856633966395081711430940962809568685031934329025999216833965518452765, 'result': "In a world of chaos and strife,\nThere's beauty in the simplest of life.\nA gentle breeze whispers through the trees,\nAnd birds sing melodies with ease.\n\nThe sun sets in a fiery hue,\nPainting the sky in shades of blue.\nStars twinkle in the darkness above,\nGuiding us with their light and love.\n\nSo take a moment to pause and see,\nThe wonders of this world so free.\nEmbrace the joy that each day brings,\nAnd let your heart soar on gentle wings.", 'prompt': 'write a short poem', 'cost_dict': {}, 'metadata': {'model': None, 'tool': 'openai-gpt-3.5-turbo'}}
157
176
  ```
158
177
 
178
+ #### With the Mech Marketplace
179
+
180
+ With the Mech Marketplace, the basic usage of the Mech Client is as follows.
181
+
182
+ ```bash
183
+ mechx interact <prompt> --tool openai-gpt-3.5-turbo --chain-config <chain_config>
184
+ ```
185
+
186
+ To use a custom mech to send requests to, use the `priority-mech` flag while sending the requests
187
+
188
+ ```bash
189
+ mechx interact <prompt> --priority-mech <priority mech address> --tool openai-gpt-3.5-turbo --chain-config <chain_config>
190
+ ```
191
+
192
+ Additionally to other options which are the same as for legacy Mechs, this usage has the following option:
193
+
194
+ `--use-prepaid <bool>`: use the prepaid method to send requests to a Mech via the Mech Marketplace. Defaults to False.
195
+ `--use-offchain <bool>`: use the off-chain method to send requests to a Mech via the Mech Marketplace. Defaults to False.
159
196
 
160
197
  ### List tools available for agents
161
198
 
@@ -267,6 +304,8 @@ Output Schema:
267
304
 
268
305
  ### Chain configuration
269
306
 
307
+ #### For legacy Mechs
308
+
270
309
  Default configurations for different chains are stored in the file [configs/mechs.json](./mech_client/configs/mechs.json). If `--chain-config` parameter is not specified, the Mech Client will choose the first configuration on the JSON.
271
310
 
272
311
  Additionally, you can override any configuration parameter by exporting any of the following environment variables:
@@ -359,6 +398,11 @@ This script will:
359
398
  - Retrieve and display the description of a specific tool using its unique identifier.
360
399
  - Retrieve and display the input and output schema of a specific tool using its unique identifier.
361
400
 
401
+ #### For Mechs receiving requests via the Mech Marketplace
402
+
403
+ In this case, the script is the same, except for the function result. When this function has no argument agent_id,
404
+ the request is sent to the Mech Marketplace. The target Mech to which the request is relayed should be in the chain_config file (key `priority_mech_address`).
405
+
362
406
  ## Developer installation
363
407
 
364
408
  To setup the development environment for this project, clone the repository and run the following commands:
@@ -0,0 +1,3 @@
1
+ """Mech client."""
2
+
3
+ __version__ = "0.3.0"
@@ -0,0 +1,503 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_mechMarketplace",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_drainer",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "_wrappedNativeToken",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "uint256",
27
+ "name": "current",
28
+ "type": "uint256"
29
+ },
30
+ {
31
+ "internalType": "uint256",
32
+ "name": "required",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "InsufficientBalance",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [
41
+ {
42
+ "internalType": "address",
43
+ "name": "sender",
44
+ "type": "address"
45
+ },
46
+ {
47
+ "internalType": "address",
48
+ "name": "marketplace",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "name": "MarketplaceOnly",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "ReentrancyGuard",
58
+ "type": "error"
59
+ },
60
+ {
61
+ "inputs": [
62
+ {
63
+ "internalType": "address",
64
+ "name": "token",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "internalType": "address",
69
+ "name": "from",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "internalType": "address",
74
+ "name": "to",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "internalType": "uint256",
79
+ "name": "amount",
80
+ "type": "uint256"
81
+ }
82
+ ],
83
+ "name": "TransferFailed",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [
88
+ {
89
+ "internalType": "address",
90
+ "name": "account",
91
+ "type": "address"
92
+ }
93
+ ],
94
+ "name": "UnauthorizedAccount",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "ZeroAddress",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "inputs": [],
104
+ "name": "ZeroValue",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "anonymous": false,
109
+ "inputs": [
110
+ {
111
+ "indexed": true,
112
+ "internalType": "address",
113
+ "name": "account",
114
+ "type": "address"
115
+ },
116
+ {
117
+ "indexed": true,
118
+ "internalType": "address",
119
+ "name": "token",
120
+ "type": "address"
121
+ },
122
+ {
123
+ "indexed": false,
124
+ "internalType": "uint256",
125
+ "name": "amount",
126
+ "type": "uint256"
127
+ }
128
+ ],
129
+ "name": "Deposit",
130
+ "type": "event"
131
+ },
132
+ {
133
+ "anonymous": false,
134
+ "inputs": [
135
+ {
136
+ "indexed": true,
137
+ "internalType": "address",
138
+ "name": "token",
139
+ "type": "address"
140
+ },
141
+ {
142
+ "indexed": false,
143
+ "internalType": "uint256",
144
+ "name": "collectedFees",
145
+ "type": "uint256"
146
+ }
147
+ ],
148
+ "name": "Drained",
149
+ "type": "event"
150
+ },
151
+ {
152
+ "anonymous": false,
153
+ "inputs": [
154
+ {
155
+ "indexed": true,
156
+ "internalType": "address",
157
+ "name": "mech",
158
+ "type": "address"
159
+ },
160
+ {
161
+ "indexed": false,
162
+ "internalType": "uint256",
163
+ "name": "deliveryRate",
164
+ "type": "uint256"
165
+ },
166
+ {
167
+ "indexed": false,
168
+ "internalType": "uint256",
169
+ "name": "balance",
170
+ "type": "uint256"
171
+ },
172
+ {
173
+ "indexed": false,
174
+ "internalType": "uint256",
175
+ "name": "rateDiff",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "MechBalanceAdjusted",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "anonymous": false,
184
+ "inputs": [
185
+ {
186
+ "indexed": true,
187
+ "internalType": "address",
188
+ "name": "requester",
189
+ "type": "address"
190
+ },
191
+ {
192
+ "indexed": false,
193
+ "internalType": "uint256",
194
+ "name": "deliveryRate",
195
+ "type": "uint256"
196
+ },
197
+ {
198
+ "indexed": false,
199
+ "internalType": "uint256",
200
+ "name": "balance",
201
+ "type": "uint256"
202
+ }
203
+ ],
204
+ "name": "RequesterBalanceAdjusted",
205
+ "type": "event"
206
+ },
207
+ {
208
+ "anonymous": false,
209
+ "inputs": [
210
+ {
211
+ "indexed": true,
212
+ "internalType": "address",
213
+ "name": "account",
214
+ "type": "address"
215
+ },
216
+ {
217
+ "indexed": true,
218
+ "internalType": "address",
219
+ "name": "token",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "indexed": false,
224
+ "internalType": "uint256",
225
+ "name": "amount",
226
+ "type": "uint256"
227
+ }
228
+ ],
229
+ "name": "Withdraw",
230
+ "type": "event"
231
+ },
232
+ {
233
+ "inputs": [],
234
+ "name": "MAX_FEE_FACTOR",
235
+ "outputs": [
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "",
239
+ "type": "uint256"
240
+ }
241
+ ],
242
+ "stateMutability": "view",
243
+ "type": "function"
244
+ },
245
+ {
246
+ "inputs": [],
247
+ "name": "MIN_MECH_BALANCE",
248
+ "outputs": [
249
+ {
250
+ "internalType": "uint256",
251
+ "name": "",
252
+ "type": "uint256"
253
+ }
254
+ ],
255
+ "stateMutability": "view",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [
260
+ {
261
+ "internalType": "address",
262
+ "name": "mech",
263
+ "type": "address"
264
+ },
265
+ {
266
+ "internalType": "address",
267
+ "name": "requester",
268
+ "type": "address"
269
+ },
270
+ {
271
+ "internalType": "uint256[]",
272
+ "name": "mechDeliveryRates",
273
+ "type": "uint256[]"
274
+ },
275
+ {
276
+ "internalType": "bytes",
277
+ "name": "paymentData",
278
+ "type": "bytes"
279
+ }
280
+ ],
281
+ "name": "adjustMechRequesterBalances",
282
+ "outputs": [],
283
+ "stateMutability": "nonpayable",
284
+ "type": "function"
285
+ },
286
+ {
287
+ "inputs": [
288
+ {
289
+ "internalType": "address",
290
+ "name": "requester",
291
+ "type": "address"
292
+ },
293
+ {
294
+ "internalType": "uint256",
295
+ "name": "numRequests",
296
+ "type": "uint256"
297
+ },
298
+ {
299
+ "internalType": "uint256",
300
+ "name": "deliveryRate",
301
+ "type": "uint256"
302
+ },
303
+ {
304
+ "internalType": "bytes",
305
+ "name": "paymentData",
306
+ "type": "bytes"
307
+ }
308
+ ],
309
+ "name": "checkAndRecordDeliveryRates",
310
+ "outputs": [],
311
+ "stateMutability": "payable",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [],
316
+ "name": "collectedFees",
317
+ "outputs": [
318
+ {
319
+ "internalType": "uint256",
320
+ "name": "",
321
+ "type": "uint256"
322
+ }
323
+ ],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ {
330
+ "internalType": "address",
331
+ "name": "account",
332
+ "type": "address"
333
+ }
334
+ ],
335
+ "name": "depositFor",
336
+ "outputs": [],
337
+ "stateMutability": "payable",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "inputs": [],
342
+ "name": "drain",
343
+ "outputs": [],
344
+ "stateMutability": "nonpayable",
345
+ "type": "function"
346
+ },
347
+ {
348
+ "inputs": [],
349
+ "name": "drainer",
350
+ "outputs": [
351
+ {
352
+ "internalType": "address",
353
+ "name": "",
354
+ "type": "address"
355
+ }
356
+ ],
357
+ "stateMutability": "view",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "inputs": [
362
+ {
363
+ "internalType": "address",
364
+ "name": "mech",
365
+ "type": "address"
366
+ },
367
+ {
368
+ "internalType": "address[]",
369
+ "name": "requesters",
370
+ "type": "address[]"
371
+ },
372
+ {
373
+ "internalType": "bool[]",
374
+ "name": "deliveredRequests",
375
+ "type": "bool[]"
376
+ },
377
+ {
378
+ "internalType": "uint256[]",
379
+ "name": "mechDeliveryRates",
380
+ "type": "uint256[]"
381
+ },
382
+ {
383
+ "internalType": "uint256[]",
384
+ "name": "requesterDeliveryRates",
385
+ "type": "uint256[]"
386
+ }
387
+ ],
388
+ "name": "finalizeDeliveryRates",
389
+ "outputs": [],
390
+ "stateMutability": "nonpayable",
391
+ "type": "function"
392
+ },
393
+ {
394
+ "inputs": [
395
+ {
396
+ "internalType": "address",
397
+ "name": "",
398
+ "type": "address"
399
+ }
400
+ ],
401
+ "name": "mapMechBalances",
402
+ "outputs": [
403
+ {
404
+ "internalType": "uint256",
405
+ "name": "",
406
+ "type": "uint256"
407
+ }
408
+ ],
409
+ "stateMutability": "view",
410
+ "type": "function"
411
+ },
412
+ {
413
+ "inputs": [
414
+ {
415
+ "internalType": "address",
416
+ "name": "",
417
+ "type": "address"
418
+ }
419
+ ],
420
+ "name": "mapRequesterBalances",
421
+ "outputs": [
422
+ {
423
+ "internalType": "uint256",
424
+ "name": "",
425
+ "type": "uint256"
426
+ }
427
+ ],
428
+ "stateMutability": "view",
429
+ "type": "function"
430
+ },
431
+ {
432
+ "inputs": [],
433
+ "name": "mechMarketplace",
434
+ "outputs": [
435
+ {
436
+ "internalType": "address",
437
+ "name": "",
438
+ "type": "address"
439
+ }
440
+ ],
441
+ "stateMutability": "view",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [],
446
+ "name": "processPayment",
447
+ "outputs": [
448
+ {
449
+ "internalType": "uint256",
450
+ "name": "mechPayment",
451
+ "type": "uint256"
452
+ },
453
+ {
454
+ "internalType": "uint256",
455
+ "name": "marketplaceFee",
456
+ "type": "uint256"
457
+ }
458
+ ],
459
+ "stateMutability": "nonpayable",
460
+ "type": "function"
461
+ },
462
+ {
463
+ "inputs": [
464
+ {
465
+ "internalType": "address",
466
+ "name": "mech",
467
+ "type": "address"
468
+ }
469
+ ],
470
+ "name": "processPaymentByMultisig",
471
+ "outputs": [
472
+ {
473
+ "internalType": "uint256",
474
+ "name": "mechPayment",
475
+ "type": "uint256"
476
+ },
477
+ {
478
+ "internalType": "uint256",
479
+ "name": "marketplaceFee",
480
+ "type": "uint256"
481
+ }
482
+ ],
483
+ "stateMutability": "nonpayable",
484
+ "type": "function"
485
+ },
486
+ {
487
+ "inputs": [],
488
+ "name": "wrappedNativeToken",
489
+ "outputs": [
490
+ {
491
+ "internalType": "address",
492
+ "name": "",
493
+ "type": "address"
494
+ }
495
+ ],
496
+ "stateMutability": "view",
497
+ "type": "function"
498
+ },
499
+ {
500
+ "stateMutability": "payable",
501
+ "type": "receive"
502
+ }
503
+ ]