olas-operate-middleware 0.1.0rc59__py3-none-any.whl → 0.13.2__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 (98) hide show
  1. olas_operate_middleware-0.13.2.dist-info/METADATA +75 -0
  2. olas_operate_middleware-0.13.2.dist-info/RECORD +101 -0
  3. {olas_operate_middleware-0.1.0rc59.dist-info → olas_operate_middleware-0.13.2.dist-info}/WHEEL +1 -1
  4. operate/__init__.py +17 -0
  5. operate/account/user.py +35 -9
  6. operate/bridge/bridge_manager.py +470 -0
  7. operate/bridge/providers/lifi_provider.py +377 -0
  8. operate/bridge/providers/native_bridge_provider.py +677 -0
  9. operate/bridge/providers/provider.py +469 -0
  10. operate/bridge/providers/relay_provider.py +457 -0
  11. operate/cli.py +1565 -417
  12. operate/constants.py +60 -12
  13. operate/data/README.md +19 -0
  14. operate/data/contracts/{service_staking_token → dual_staking_token}/__init__.py +2 -2
  15. operate/data/contracts/dual_staking_token/build/DualStakingToken.json +443 -0
  16. operate/data/contracts/dual_staking_token/contract.py +132 -0
  17. operate/data/contracts/dual_staking_token/contract.yaml +23 -0
  18. operate/{ledger/base.py → data/contracts/foreign_omnibridge/__init__.py} +2 -19
  19. operate/data/contracts/foreign_omnibridge/build/ForeignOmnibridge.json +1372 -0
  20. operate/data/contracts/foreign_omnibridge/contract.py +130 -0
  21. operate/data/contracts/foreign_omnibridge/contract.yaml +23 -0
  22. operate/{ledger/solana.py → data/contracts/home_omnibridge/__init__.py} +2 -20
  23. operate/data/contracts/home_omnibridge/build/HomeOmnibridge.json +1421 -0
  24. operate/data/contracts/home_omnibridge/contract.py +80 -0
  25. operate/data/contracts/home_omnibridge/contract.yaml +23 -0
  26. operate/data/contracts/l1_standard_bridge/__init__.py +20 -0
  27. operate/data/contracts/l1_standard_bridge/build/L1StandardBridge.json +831 -0
  28. operate/data/contracts/l1_standard_bridge/contract.py +158 -0
  29. operate/data/contracts/l1_standard_bridge/contract.yaml +23 -0
  30. operate/data/contracts/l2_standard_bridge/__init__.py +20 -0
  31. operate/data/contracts/l2_standard_bridge/build/L2StandardBridge.json +626 -0
  32. operate/data/contracts/l2_standard_bridge/contract.py +130 -0
  33. operate/data/contracts/l2_standard_bridge/contract.yaml +23 -0
  34. operate/data/contracts/mech_activity/__init__.py +20 -0
  35. operate/data/contracts/mech_activity/build/MechActivity.json +111 -0
  36. operate/data/contracts/mech_activity/contract.py +44 -0
  37. operate/data/contracts/mech_activity/contract.yaml +23 -0
  38. operate/data/contracts/optimism_mintable_erc20/__init__.py +20 -0
  39. operate/data/contracts/optimism_mintable_erc20/build/OptimismMintableERC20.json +491 -0
  40. operate/data/contracts/optimism_mintable_erc20/contract.py +45 -0
  41. operate/data/contracts/optimism_mintable_erc20/contract.yaml +23 -0
  42. operate/data/contracts/recovery_module/__init__.py +20 -0
  43. operate/data/contracts/recovery_module/build/RecoveryModule.json +811 -0
  44. operate/data/contracts/recovery_module/contract.py +61 -0
  45. operate/data/contracts/recovery_module/contract.yaml +23 -0
  46. operate/data/contracts/requester_activity_checker/__init__.py +20 -0
  47. operate/data/contracts/requester_activity_checker/build/RequesterActivityChecker.json +111 -0
  48. operate/data/contracts/requester_activity_checker/contract.py +33 -0
  49. operate/data/contracts/requester_activity_checker/contract.yaml +23 -0
  50. operate/data/contracts/staking_token/__init__.py +20 -0
  51. operate/data/contracts/staking_token/build/StakingToken.json +1336 -0
  52. operate/data/contracts/{service_staking_token → staking_token}/contract.py +27 -13
  53. operate/data/contracts/staking_token/contract.yaml +23 -0
  54. operate/data/contracts/uniswap_v2_erc20/contract.yaml +3 -1
  55. operate/data/contracts/uniswap_v2_erc20/tests/__init__.py +20 -0
  56. operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py +363 -0
  57. operate/keys.py +118 -33
  58. operate/ledger/__init__.py +159 -56
  59. operate/ledger/profiles.py +321 -18
  60. operate/migration.py +555 -0
  61. operate/{http → operate_http}/__init__.py +3 -2
  62. operate/{http → operate_http}/exceptions.py +6 -4
  63. operate/operate_types.py +544 -0
  64. operate/pearl.py +13 -1
  65. operate/quickstart/analyse_logs.py +118 -0
  66. operate/quickstart/claim_staking_rewards.py +104 -0
  67. operate/quickstart/reset_configs.py +106 -0
  68. operate/quickstart/reset_password.py +70 -0
  69. operate/quickstart/reset_staking.py +145 -0
  70. operate/quickstart/run_service.py +726 -0
  71. operate/quickstart/stop_service.py +72 -0
  72. operate/quickstart/terminate_on_chain_service.py +83 -0
  73. operate/quickstart/utils.py +298 -0
  74. operate/resource.py +62 -3
  75. operate/services/agent_runner.py +202 -0
  76. operate/services/deployment_runner.py +868 -0
  77. operate/services/funding_manager.py +929 -0
  78. operate/services/health_checker.py +280 -0
  79. operate/services/manage.py +2356 -620
  80. operate/services/protocol.py +1246 -340
  81. operate/services/service.py +756 -391
  82. operate/services/utils/mech.py +103 -0
  83. operate/services/utils/tendermint.py +86 -12
  84. operate/settings.py +70 -0
  85. operate/utils/__init__.py +135 -0
  86. operate/utils/gnosis.py +407 -80
  87. operate/utils/single_instance.py +226 -0
  88. operate/utils/ssl.py +133 -0
  89. operate/wallet/master.py +708 -123
  90. operate/wallet/wallet_recovery_manager.py +507 -0
  91. olas_operate_middleware-0.1.0rc59.dist-info/METADATA +0 -304
  92. olas_operate_middleware-0.1.0rc59.dist-info/RECORD +0 -41
  93. operate/data/contracts/service_staking_token/build/ServiceStakingToken.json +0 -1273
  94. operate/data/contracts/service_staking_token/contract.yaml +0 -23
  95. operate/ledger/ethereum.py +0 -48
  96. operate/types.py +0 -260
  97. {olas_operate_middleware-0.1.0rc59.dist-info → olas_operate_middleware-0.13.2.dist-info}/entry_points.txt +0 -0
  98. {olas_operate_middleware-0.1.0rc59.dist-info → olas_operate_middleware-0.13.2.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,491 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "OptimismMintableERC20",
4
+ "sourceName": "OptimismMintableERC20.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "address",
10
+ "name": "_bridge",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "internalType": "address",
15
+ "name": "_remoteToken",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "string",
20
+ "name": "_name",
21
+ "type": "string"
22
+ },
23
+ {
24
+ "internalType": "string",
25
+ "name": "_symbol",
26
+ "type": "string"
27
+ }
28
+ ],
29
+ "stateMutability": "nonpayable",
30
+ "type": "constructor"
31
+ },
32
+ {
33
+ "anonymous": false,
34
+ "inputs": [
35
+ {
36
+ "indexed": true,
37
+ "internalType": "address",
38
+ "name": "owner",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "indexed": true,
43
+ "internalType": "address",
44
+ "name": "spender",
45
+ "type": "address"
46
+ },
47
+ {
48
+ "indexed": false,
49
+ "internalType": "uint256",
50
+ "name": "value",
51
+ "type": "uint256"
52
+ }
53
+ ],
54
+ "name": "Approval",
55
+ "type": "event"
56
+ },
57
+ {
58
+ "anonymous": false,
59
+ "inputs": [
60
+ {
61
+ "indexed": true,
62
+ "internalType": "address",
63
+ "name": "account",
64
+ "type": "address"
65
+ },
66
+ {
67
+ "indexed": false,
68
+ "internalType": "uint256",
69
+ "name": "amount",
70
+ "type": "uint256"
71
+ }
72
+ ],
73
+ "name": "Burn",
74
+ "type": "event"
75
+ },
76
+ {
77
+ "anonymous": false,
78
+ "inputs": [
79
+ {
80
+ "indexed": true,
81
+ "internalType": "address",
82
+ "name": "account",
83
+ "type": "address"
84
+ },
85
+ {
86
+ "indexed": false,
87
+ "internalType": "uint256",
88
+ "name": "amount",
89
+ "type": "uint256"
90
+ }
91
+ ],
92
+ "name": "Mint",
93
+ "type": "event"
94
+ },
95
+ {
96
+ "anonymous": false,
97
+ "inputs": [
98
+ {
99
+ "indexed": true,
100
+ "internalType": "address",
101
+ "name": "from",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "indexed": true,
106
+ "internalType": "address",
107
+ "name": "to",
108
+ "type": "address"
109
+ },
110
+ {
111
+ "indexed": false,
112
+ "internalType": "uint256",
113
+ "name": "value",
114
+ "type": "uint256"
115
+ }
116
+ ],
117
+ "name": "Transfer",
118
+ "type": "event"
119
+ },
120
+ {
121
+ "inputs": [],
122
+ "name": "BRIDGE",
123
+ "outputs": [
124
+ {
125
+ "internalType": "address",
126
+ "name": "",
127
+ "type": "address"
128
+ }
129
+ ],
130
+ "stateMutability": "view",
131
+ "type": "function"
132
+ },
133
+ {
134
+ "inputs": [],
135
+ "name": "REMOTE_TOKEN",
136
+ "outputs": [
137
+ {
138
+ "internalType": "address",
139
+ "name": "",
140
+ "type": "address"
141
+ }
142
+ ],
143
+ "stateMutability": "view",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "address",
150
+ "name": "owner",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "internalType": "address",
155
+ "name": "spender",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "allowance",
160
+ "outputs": [
161
+ {
162
+ "internalType": "uint256",
163
+ "name": "",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "stateMutability": "view",
168
+ "type": "function"
169
+ },
170
+ {
171
+ "inputs": [
172
+ {
173
+ "internalType": "address",
174
+ "name": "spender",
175
+ "type": "address"
176
+ },
177
+ {
178
+ "internalType": "uint256",
179
+ "name": "amount",
180
+ "type": "uint256"
181
+ }
182
+ ],
183
+ "name": "approve",
184
+ "outputs": [
185
+ {
186
+ "internalType": "bool",
187
+ "name": "",
188
+ "type": "bool"
189
+ }
190
+ ],
191
+ "stateMutability": "nonpayable",
192
+ "type": "function"
193
+ },
194
+ {
195
+ "inputs": [
196
+ {
197
+ "internalType": "address",
198
+ "name": "account",
199
+ "type": "address"
200
+ }
201
+ ],
202
+ "name": "balanceOf",
203
+ "outputs": [
204
+ {
205
+ "internalType": "uint256",
206
+ "name": "",
207
+ "type": "uint256"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [],
215
+ "name": "bridge",
216
+ "outputs": [
217
+ {
218
+ "internalType": "address",
219
+ "name": "",
220
+ "type": "address"
221
+ }
222
+ ],
223
+ "stateMutability": "view",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [
228
+ {
229
+ "internalType": "address",
230
+ "name": "_from",
231
+ "type": "address"
232
+ },
233
+ {
234
+ "internalType": "uint256",
235
+ "name": "_amount",
236
+ "type": "uint256"
237
+ }
238
+ ],
239
+ "name": "burn",
240
+ "outputs": [],
241
+ "stateMutability": "nonpayable",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [],
246
+ "name": "decimals",
247
+ "outputs": [
248
+ {
249
+ "internalType": "uint8",
250
+ "name": "",
251
+ "type": "uint8"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [
259
+ {
260
+ "internalType": "address",
261
+ "name": "spender",
262
+ "type": "address"
263
+ },
264
+ {
265
+ "internalType": "uint256",
266
+ "name": "subtractedValue",
267
+ "type": "uint256"
268
+ }
269
+ ],
270
+ "name": "decreaseAllowance",
271
+ "outputs": [
272
+ {
273
+ "internalType": "bool",
274
+ "name": "",
275
+ "type": "bool"
276
+ }
277
+ ],
278
+ "stateMutability": "nonpayable",
279
+ "type": "function"
280
+ },
281
+ {
282
+ "inputs": [
283
+ {
284
+ "internalType": "address",
285
+ "name": "spender",
286
+ "type": "address"
287
+ },
288
+ {
289
+ "internalType": "uint256",
290
+ "name": "addedValue",
291
+ "type": "uint256"
292
+ }
293
+ ],
294
+ "name": "increaseAllowance",
295
+ "outputs": [
296
+ {
297
+ "internalType": "bool",
298
+ "name": "",
299
+ "type": "bool"
300
+ }
301
+ ],
302
+ "stateMutability": "nonpayable",
303
+ "type": "function"
304
+ },
305
+ {
306
+ "inputs": [],
307
+ "name": "l1Token",
308
+ "outputs": [
309
+ {
310
+ "internalType": "address",
311
+ "name": "",
312
+ "type": "address"
313
+ }
314
+ ],
315
+ "stateMutability": "view",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [],
320
+ "name": "l2Bridge",
321
+ "outputs": [
322
+ {
323
+ "internalType": "address",
324
+ "name": "",
325
+ "type": "address"
326
+ }
327
+ ],
328
+ "stateMutability": "view",
329
+ "type": "function"
330
+ },
331
+ {
332
+ "inputs": [
333
+ {
334
+ "internalType": "address",
335
+ "name": "_to",
336
+ "type": "address"
337
+ },
338
+ {
339
+ "internalType": "uint256",
340
+ "name": "_amount",
341
+ "type": "uint256"
342
+ }
343
+ ],
344
+ "name": "mint",
345
+ "outputs": [],
346
+ "stateMutability": "nonpayable",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "name",
352
+ "outputs": [
353
+ {
354
+ "internalType": "string",
355
+ "name": "",
356
+ "type": "string"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [],
364
+ "name": "remoteToken",
365
+ "outputs": [
366
+ {
367
+ "internalType": "address",
368
+ "name": "",
369
+ "type": "address"
370
+ }
371
+ ],
372
+ "stateMutability": "view",
373
+ "type": "function"
374
+ },
375
+ {
376
+ "inputs": [
377
+ {
378
+ "internalType": "bytes4",
379
+ "name": "_interfaceId",
380
+ "type": "bytes4"
381
+ }
382
+ ],
383
+ "name": "supportsInterface",
384
+ "outputs": [
385
+ {
386
+ "internalType": "bool",
387
+ "name": "",
388
+ "type": "bool"
389
+ }
390
+ ],
391
+ "stateMutability": "pure",
392
+ "type": "function"
393
+ },
394
+ {
395
+ "inputs": [],
396
+ "name": "symbol",
397
+ "outputs": [
398
+ {
399
+ "internalType": "string",
400
+ "name": "",
401
+ "type": "string"
402
+ }
403
+ ],
404
+ "stateMutability": "view",
405
+ "type": "function"
406
+ },
407
+ {
408
+ "inputs": [],
409
+ "name": "totalSupply",
410
+ "outputs": [
411
+ {
412
+ "internalType": "uint256",
413
+ "name": "",
414
+ "type": "uint256"
415
+ }
416
+ ],
417
+ "stateMutability": "view",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "inputs": [
422
+ {
423
+ "internalType": "address",
424
+ "name": "to",
425
+ "type": "address"
426
+ },
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "amount",
430
+ "type": "uint256"
431
+ }
432
+ ],
433
+ "name": "transfer",
434
+ "outputs": [
435
+ {
436
+ "internalType": "bool",
437
+ "name": "",
438
+ "type": "bool"
439
+ }
440
+ ],
441
+ "stateMutability": "nonpayable",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [
446
+ {
447
+ "internalType": "address",
448
+ "name": "from",
449
+ "type": "address"
450
+ },
451
+ {
452
+ "internalType": "address",
453
+ "name": "to",
454
+ "type": "address"
455
+ },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "amount",
459
+ "type": "uint256"
460
+ }
461
+ ],
462
+ "name": "transferFrom",
463
+ "outputs": [
464
+ {
465
+ "internalType": "bool",
466
+ "name": "",
467
+ "type": "bool"
468
+ }
469
+ ],
470
+ "stateMutability": "nonpayable",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "version",
476
+ "outputs": [
477
+ {
478
+ "internalType": "string",
479
+ "name": "",
480
+ "type": "string"
481
+ }
482
+ ],
483
+ "stateMutability": "view",
484
+ "type": "function"
485
+ }
486
+ ],
487
+ "bytecode": "",
488
+ "deployedBytecode": "",
489
+ "linkReferences": {},
490
+ "deployedLinkReferences": {}
491
+ }
@@ -0,0 +1,45 @@
1
+ # -*- coding: utf-8 -*-
2
+ # ------------------------------------------------------------------------------
3
+ #
4
+ # Copyright 2024 Valory AG
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # ------------------------------------------------------------------------------
19
+
20
+ """This module contains the class to connect to the `OptimismMintableERC20` contract."""
21
+
22
+
23
+ from aea.common import JSONLike
24
+ from aea.configurations.base import PublicId
25
+ from aea.contracts.base import Contract
26
+ from aea.crypto.base import LedgerApi
27
+
28
+
29
+ class OptimismMintableERC20(Contract):
30
+ """Optimism OptimismMintableERC20."""
31
+
32
+ contract_id = PublicId.from_str("valory/optimism_mintable_erc20:0.1.0")
33
+
34
+ @classmethod
35
+ def l1_token(
36
+ cls,
37
+ ledger_api: LedgerApi,
38
+ contract_address: str,
39
+ ) -> JSONLike:
40
+ """l1Token"""
41
+ contract_instance = cls.get_instance(
42
+ ledger_api=ledger_api, contract_address=contract_address
43
+ )
44
+ l1_token = contract_instance.functions.l1Token().call()
45
+ return dict(data=l1_token)
@@ -0,0 +1,23 @@
1
+ name: optimism_mintable_erc20
2
+ author: valory
3
+ version: 0.1.0
4
+ type: contract
5
+ description: Optimism Mintable ERC20
6
+ license: Apache-2.0
7
+ aea_version: '>=1.0.0, <2.0.0'
8
+ fingerprint:
9
+ __init__.py: bafybeiffqotbwpjde3htgfuplg62x4btoekvitqrkrlx2vkjpciwzov6sy
10
+ build/OptimismMintableERC20.json: bafybeieuzn55dh5zlg4ygtuifqso6hwbhsjvidxkjkh2vnah5psxqup62i
11
+ contract.py: bafybeiauq7vas7xuyb2zt4m5mb6i2g2nrwtptv6muivur5u3c5lwckys4q
12
+ fingerprint_ignore_patterns: []
13
+ contracts: []
14
+ class_name: OptimismMintableERC20
15
+ contract_interface_paths:
16
+ ethereum: build/OptimismMintableERC20.json
17
+ dependencies:
18
+ open-aea-ledger-ethereum:
19
+ version: ==1.60.0
20
+ open-aea-test-autonomy:
21
+ version: ==0.18.3
22
+ web3:
23
+ version: <7,>=6.0.0
@@ -0,0 +1,20 @@
1
+ # -*- coding: utf-8 -*-
2
+ # ------------------------------------------------------------------------------
3
+ #
4
+ # Copyright 2025 Valory AG
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # ------------------------------------------------------------------------------
19
+
20
+ """This module contains the support resources for the `RecoveryModule` contract."""