olas-operate-middleware 0.13.4__tar.gz → 0.13.6__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 (100) hide show
  1. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/PKG-INFO +2 -2
  2. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/ledger/profiles.py +2 -0
  3. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/run_service.py +1 -0
  4. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/manage.py +0 -10
  5. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/service.py +1 -1
  6. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/utils/gnosis.py +0 -25
  7. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/utils/single_instance.py +3 -3
  8. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/wallet/master.py +21 -12
  9. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/pyproject.toml +2 -2
  10. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/LICENSE +0 -0
  11. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/README.md +0 -0
  12. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/__init__.py +0 -0
  13. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/account/__init__.py +0 -0
  14. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/account/user.py +0 -0
  15. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/bridge/bridge_manager.py +0 -0
  16. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/bridge/providers/lifi_provider.py +0 -0
  17. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/bridge/providers/native_bridge_provider.py +0 -0
  18. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/bridge/providers/provider.py +0 -0
  19. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/bridge/providers/relay_provider.py +0 -0
  20. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/cli.py +0 -0
  21. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/constants.py +0 -0
  22. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/README.md +0 -0
  23. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/__init__.py +0 -0
  24. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/__init__.py +0 -0
  25. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/dual_staking_token/__init__.py +0 -0
  26. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/dual_staking_token/build/DualStakingToken.json +0 -0
  27. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/dual_staking_token/contract.py +0 -0
  28. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/dual_staking_token/contract.yaml +0 -0
  29. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/foreign_omnibridge/__init__.py +0 -0
  30. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/foreign_omnibridge/build/ForeignOmnibridge.json +0 -0
  31. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/foreign_omnibridge/contract.py +0 -0
  32. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/foreign_omnibridge/contract.yaml +0 -0
  33. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/home_omnibridge/__init__.py +0 -0
  34. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/home_omnibridge/build/HomeOmnibridge.json +0 -0
  35. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/home_omnibridge/contract.py +0 -0
  36. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/home_omnibridge/contract.yaml +0 -0
  37. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l1_standard_bridge/__init__.py +0 -0
  38. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l1_standard_bridge/build/L1StandardBridge.json +0 -0
  39. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l1_standard_bridge/contract.py +0 -0
  40. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l1_standard_bridge/contract.yaml +0 -0
  41. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l2_standard_bridge/__init__.py +0 -0
  42. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l2_standard_bridge/build/L2StandardBridge.json +0 -0
  43. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l2_standard_bridge/contract.py +0 -0
  44. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/l2_standard_bridge/contract.yaml +0 -0
  45. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/mech_activity/__init__.py +0 -0
  46. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/mech_activity/build/MechActivity.json +0 -0
  47. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/mech_activity/contract.py +0 -0
  48. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/mech_activity/contract.yaml +0 -0
  49. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/optimism_mintable_erc20/__init__.py +0 -0
  50. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/optimism_mintable_erc20/build/OptimismMintableERC20.json +0 -0
  51. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/optimism_mintable_erc20/contract.py +0 -0
  52. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/optimism_mintable_erc20/contract.yaml +0 -0
  53. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/recovery_module/__init__.py +0 -0
  54. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/recovery_module/build/RecoveryModule.json +0 -0
  55. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/recovery_module/contract.py +0 -0
  56. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/recovery_module/contract.yaml +0 -0
  57. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/requester_activity_checker/__init__.py +0 -0
  58. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/requester_activity_checker/build/RequesterActivityChecker.json +0 -0
  59. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/requester_activity_checker/contract.py +0 -0
  60. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/requester_activity_checker/contract.yaml +0 -0
  61. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/staking_token/__init__.py +0 -0
  62. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/staking_token/build/StakingToken.json +0 -0
  63. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/staking_token/contract.py +0 -0
  64. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/staking_token/contract.yaml +0 -0
  65. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/uniswap_v2_erc20/__init__.py +0 -0
  66. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/uniswap_v2_erc20/build/IUniswapV2ERC20.json +0 -0
  67. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/uniswap_v2_erc20/contract.py +0 -0
  68. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/uniswap_v2_erc20/contract.yaml +0 -0
  69. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/uniswap_v2_erc20/tests/__init__.py +0 -0
  70. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py +0 -0
  71. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/keys.py +0 -0
  72. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/ledger/__init__.py +0 -0
  73. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/migration.py +0 -0
  74. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/operate_http/__init__.py +0 -0
  75. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/operate_http/exceptions.py +0 -0
  76. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/operate_types.py +0 -0
  77. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/pearl.py +0 -0
  78. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/analyse_logs.py +0 -0
  79. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/claim_staking_rewards.py +0 -0
  80. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/reset_configs.py +0 -0
  81. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/reset_password.py +0 -0
  82. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/reset_staking.py +0 -0
  83. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/stop_service.py +0 -0
  84. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/terminate_on_chain_service.py +0 -0
  85. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/quickstart/utils.py +0 -0
  86. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/resource.py +0 -0
  87. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/__init__.py +0 -0
  88. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/agent_runner.py +0 -0
  89. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/deployment_runner.py +0 -0
  90. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/funding_manager.py +0 -0
  91. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/health_checker.py +0 -0
  92. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/protocol.py +0 -0
  93. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/utils/__init__.py +0 -0
  94. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/utils/mech.py +0 -0
  95. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/services/utils/tendermint.py +0 -0
  96. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/settings.py +0 -0
  97. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/utils/__init__.py +0 -0
  98. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/utils/ssl.py +0 -0
  99. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/wallet/__init__.py +0 -0
  100. {olas_operate_middleware-0.13.4 → olas_operate_middleware-0.13.6}/operate/wallet/wallet_recovery_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: olas-operate-middleware
3
- Version: 0.13.4
3
+ Version: 0.13.6
4
4
  Summary:
5
5
  License-File: LICENSE
6
6
  Author: David Vilela
@@ -21,7 +21,7 @@ Requires-Dist: open-aea-cli-ipfs (>=2.0.6,<3.0.0)
21
21
  Requires-Dist: open-aea-ledger-cosmos (>=2.0.6,<3.0.0)
22
22
  Requires-Dist: open-aea-ledger-ethereum (>=2.0.6,<3.0.0)
23
23
  Requires-Dist: open-aea-ledger-ethereum-flashbots (>=2.0.6,<3.0.0)
24
- Requires-Dist: open-autonomy (>=0.21.4,<0.22.0)
24
+ Requires-Dist: open-autonomy (>=0.21.5,<0.22.0)
25
25
  Requires-Dist: psutil (>=5.9.8,<6.0.0)
26
26
  Requires-Dist: pyinstaller (>=6.8.0,<7.0.0)
27
27
  Requires-Dist: requests-mock (>=1.12.1,<2.0.0)
@@ -124,6 +124,8 @@ STAKING: t.Dict[Chain, t.Dict[str, str]] = {
124
124
  "agents_fun_1": "0x2585e63df7BD9De8e058884D496658a030b5c6ce",
125
125
  "agents_fun_2": "0x26FA75ef9Ccaa60E58260226A71e9d07564C01bF",
126
126
  "agents_fun_3": "0x4D4233EBF0473Ca8f34d105A6256A2389176F0Ce",
127
+ "pett_ai_agent_1": "0x31183503be52391844594b4B587F0e764eB3956E",
128
+ "pett_ai_agent_2": "0xEA15F76D7316B09b3f89613e32d3B780619d61e2",
127
129
  },
128
130
  Chain.CELO: {
129
131
  "meme_celo_alpha_2": "0x95D12D193d466237Bc1E92a1a7756e4264f574AB",
@@ -123,6 +123,7 @@ QS_STAKING_PROGRAMS: t.Dict[Chain, t.Dict[str, str]] = {
123
123
  "agents_fun_1": "memeooorr",
124
124
  "agents_fun_2": "memeooorr",
125
125
  "agents_fun_3": "memeooorr",
126
+ "pett_ai_agent": "pett_ai",
126
127
  },
127
128
  Chain.CELO: {},
128
129
  Chain.MODE: {
@@ -22,7 +22,6 @@
22
22
  import json
23
23
  import logging
24
24
  import os
25
- import time
26
25
  import traceback
27
26
  import typing as t
28
27
  from collections import Counter, defaultdict
@@ -967,9 +966,6 @@ class ServiceManager:
967
966
  chain_data.token = event_data["args"]["serviceId"]
968
967
  service.store()
969
968
 
970
- if is_first_mint: # Hotfix to prevent RPC out-of-sync issues
971
- time.sleep(RPC_SYNC_TIMEOUT)
972
-
973
969
  # Activate service
974
970
  if (
975
971
  self._get_on_chain_state(service=service, chain=chain)
@@ -1035,9 +1031,6 @@ class ServiceManager:
1035
1031
  )
1036
1032
  ).settle()
1037
1033
 
1038
- if is_first_mint: # Hotfix to prevent RPC out-of-sync issues
1039
- time.sleep(RPC_SYNC_TIMEOUT)
1040
-
1041
1034
  # Register agent instances
1042
1035
  if (
1043
1036
  self._get_on_chain_state(service=service, chain=chain)
@@ -1105,9 +1098,6 @@ class ServiceManager:
1105
1098
  )
1106
1099
  ).settle()
1107
1100
 
1108
- if is_first_mint: # Hotfix to prevent RPC out-of-sync issues
1109
- time.sleep(RPC_SYNC_TIMEOUT)
1110
-
1111
1101
  # Deploy service
1112
1102
  is_initial_funding = False
1113
1103
  if (
@@ -114,7 +114,7 @@ SERVICE_CONFIG_PREFIX = "sc-"
114
114
  NON_EXISTENT_MULTISIG = None
115
115
  NON_EXISTENT_TOKEN = -1
116
116
 
117
- AGENT_TYPE_IDS = {"mech": 37, "optimus": 40, "modius": 40, "trader": 25}
117
+ AGENT_TYPE_IDS = {"mech": 37, "optimus": 40, "modius": 40, "trader": 25, "pett_ai": 80}
118
118
 
119
119
  logger = setup_logger("operate.services.service")
120
120
 
@@ -22,7 +22,6 @@
22
22
  import binascii
23
23
  import itertools
24
24
  import secrets
25
- import time
26
25
  import typing as t
27
26
  from enum import Enum
28
27
 
@@ -164,7 +163,6 @@ def _get_nonce() -> int:
164
163
  def create_safe(
165
164
  ledger_api: LedgerApi,
166
165
  crypto: Crypto,
167
- backup_owner: t.Optional[str] = None,
168
166
  salt_nonce: t.Optional[int] = None,
169
167
  ) -> t.Tuple[str, int, str]:
170
168
  """Create gnosis safe."""
@@ -202,29 +200,6 @@ def create_safe(
202
200
  event_name="ProxyCreation",
203
201
  )
204
202
  safe_address = event["args"]["proxy"]
205
-
206
- if backup_owner is not None:
207
- retry_delays = [0, 60, 120, 180, 240]
208
- for attempt in range(1, len(retry_delays) + 1):
209
- try:
210
- add_owner(
211
- ledger_api=ledger_api,
212
- crypto=crypto,
213
- safe=safe_address,
214
- owner=backup_owner,
215
- )
216
- break # success
217
- except Exception as e: # pylint: disable=broad-except
218
- if attempt == len(retry_delays):
219
- raise RuntimeError(
220
- f"Failed to add backup owner {backup_owner} after {len(retry_delays)} attempts: {e}"
221
- ) from e
222
- next_delay = retry_delays[attempt]
223
- logger.error(
224
- f"Retry add owner {attempt}/{len(retry_delays)} in {next_delay} seconds due to error: {e}"
225
- )
226
- time.sleep(next_delay)
227
-
228
203
  return safe_address, salt_nonce, tx_settler.tx_hash
229
204
 
230
205
 
@@ -36,9 +36,9 @@ class AppSingleInstance:
36
36
 
37
37
  host = "127.0.0.1"
38
38
  after_kill_sleep_time = 1
39
- proc_kill_wait_timeout = 10
40
- proc_terminate_wait_timeout = 10
41
- http_request_timeout = 3
39
+ proc_kill_wait_timeout = 3
40
+ proc_terminate_wait_timeout = 3
41
+ http_request_timeout = 1
42
42
 
43
43
  def __init__(self, port_number: int, shutdown_endpoint: str = "/shutdown") -> None:
44
44
  """Initialize the AppSingleInstance manager."""
@@ -675,20 +675,29 @@ class EthereumMasterWallet(MasterWallet):
675
675
  rpc: t.Optional[str] = None,
676
676
  ) -> t.Optional[str]:
677
677
  """Create safe."""
678
- if chain in self.safes:
679
- raise ValueError(f"Wallet already has a Safe on chain {chain}.")
680
-
681
- safe, self.safe_nonce, tx_hash = create_gnosis_safe(
682
- ledger_api=self.ledger_api(chain=chain, rpc=rpc),
683
- crypto=self.crypto,
684
- backup_owner=backup_owner,
685
- salt_nonce=self.safe_nonce,
686
- )
687
- self.safe_chains.append(chain)
678
+ tx_hash = None
679
+ ledger_api = self.ledger_api(chain=chain, rpc=rpc)
688
680
  if self.safes is None:
689
681
  self.safes = {}
690
- self.safes[chain] = safe
691
- self.store()
682
+
683
+ if chain not in self.safe_chains and chain not in self.safes:
684
+ safe, self.safe_nonce, tx_hash = create_gnosis_safe(
685
+ ledger_api=ledger_api,
686
+ crypto=self.crypto,
687
+ salt_nonce=self.safe_nonce,
688
+ )
689
+ self.safe_chains.append(chain)
690
+ self.safes[chain] = safe
691
+ self.store()
692
+
693
+ if backup_owner is not None:
694
+ add_owner(
695
+ ledger_api=ledger_api,
696
+ crypto=self.crypto,
697
+ safe=self.safes[chain],
698
+ owner=backup_owner,
699
+ )
700
+
692
701
  return tx_hash
693
702
 
694
703
  def update_backup_owner(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "olas-operate-middleware"
3
- version = "0.13.4"
3
+ version = "0.13.6"
4
4
  description = ""
5
5
  authors = ["David Vilela <dvilelaf@gmail.com>", "Viraj Patel <vptl185@gmail.com>"]
6
6
  readme = "README.md"
@@ -19,7 +19,7 @@ operate = "operate.cli:main"
19
19
 
20
20
  [tool.poetry.dependencies]
21
21
  python = "<3.12,>=3.10"
22
- open-autonomy = "^0.21.4"
22
+ open-autonomy = "^0.21.5"
23
23
  open-aea-ledger-cosmos = "^2.0.6"
24
24
  open-aea-ledger-ethereum = "^2.0.6"
25
25
  open-aea-ledger-ethereum-flashbots = "^2.0.6"