olas-operate-middleware 0.10.1__py3-none-any.whl → 0.10.3__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.
- {olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/METADATA +1 -1
- {olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/RECORD +8 -8
- operate/bridge/providers/relay_provider.py +7 -1
- operate/keys.py +18 -5
- operate/quickstart/run_service.py +0 -2
- {olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/LICENSE +0 -0
- {olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/WHEEL +0 -0
- {olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/entry_points.txt +0 -0
{olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/RECORD
RENAMED
|
@@ -5,7 +5,7 @@ operate/bridge/bridge_manager.py,sha256=sUfhB1pZvBrF-kBfDOfFVoNeesCe7wd4_YahUF3F
|
|
|
5
5
|
operate/bridge/providers/lifi_provider.py,sha256=FpAlBAA_gOt-oOHKhGaOQhhTZIL-hgYYo4IIw1FN7mo,14153
|
|
6
6
|
operate/bridge/providers/native_bridge_provider.py,sha256=gG8bSyxUoAVEF6_J9tn1qKRv1PnXuMJdMwUAVJ4GJz8,24647
|
|
7
7
|
operate/bridge/providers/provider.py,sha256=i54RL7m4wMSADM_D_V_quQump_ipPTmByUc-c-AOLPQ,19687
|
|
8
|
-
operate/bridge/providers/relay_provider.py,sha256=
|
|
8
|
+
operate/bridge/providers/relay_provider.py,sha256=L7D-PKepsuBadarJmrNneZk0bsrh88u05uD6_2MSss4,17341
|
|
9
9
|
operate/cli.py,sha256=EalpBA15TXX5i3tD-2KIQOxkFwEOqOEiGMbjh36cOHw,51168
|
|
10
10
|
operate/constants.py,sha256=syGWEVyw07zK50gPS4OSSwyAbt9R6P8IttDimDt9vCY,2746
|
|
11
11
|
operate/data/README.md,sha256=jGPyZTvg2LCGdllvmYxmFMkkkiXb6YWatbqIkcX3kv4,879
|
|
@@ -53,7 +53,7 @@ operate/data/contracts/uniswap_v2_erc20/contract.py,sha256=MwBks4QmZ3XouMT_TqWLn
|
|
|
53
53
|
operate/data/contracts/uniswap_v2_erc20/contract.yaml,sha256=XUdz-XtKtmZgLfItbO8usP-QPbtUkAxKGn0hL7OftAg,741
|
|
54
54
|
operate/data/contracts/uniswap_v2_erc20/tests/__init__.py,sha256=3Arw8dsCsJz6hVOl0t9UjFASHXbV9yp3hw6x4HqgXpU,847
|
|
55
55
|
operate/data/contracts/uniswap_v2_erc20/tests/test_contract.py,sha256=FzZbw9OTcr_yvjOXpk9YcO-K40eyDARyybcfSHDg2Ps,13392
|
|
56
|
-
operate/keys.py,sha256=
|
|
56
|
+
operate/keys.py,sha256=JdnFFbzBOe9t4eS7i72EShOe25OkQdzRm_asCQHmmH0,4944
|
|
57
57
|
operate/ledger/__init__.py,sha256=ksyctDd5PU_SToN9e-_N9fAap9ZNCHw48j5hHep-erA,3353
|
|
58
58
|
operate/ledger/profiles.py,sha256=fQ9vqnXCIBZa3VHZKIvrJ-Jhn_SckFUcPC94JM5brQ8,12343
|
|
59
59
|
operate/migration.py,sha256=YIJ9P8CdW2IsMm4gW9GdAJ7EKMnUfUMUB5TItiQ0dH8,15323
|
|
@@ -66,7 +66,7 @@ operate/quickstart/claim_staking_rewards.py,sha256=AqfLMRef2YijQtWPaTuGwX2sOItNE
|
|
|
66
66
|
operate/quickstart/reset_configs.py,sha256=ipPpbYyB9gQ4KOKS-xBrRi8fT5LvwctSkQi-8XiUMig,3341
|
|
67
67
|
operate/quickstart/reset_password.py,sha256=p_gNmhWD4hb-QXUAiQRalPtVTVyB5TEPhs7GnScYzqs,2535
|
|
68
68
|
operate/quickstart/reset_staking.py,sha256=GLGUzSz6H_5lUXb9j9jFrgni_vtDXnWpPKK53favXbg,5077
|
|
69
|
-
operate/quickstart/run_service.py,sha256=
|
|
69
|
+
operate/quickstart/run_service.py,sha256=6opWEeedraCsPb6jEd44oV34jVQZJSNH8WOr-Kmo2LM,27116
|
|
70
70
|
operate/quickstart/stop_service.py,sha256=gyLgPNG6IkI6eyRkIVWEVo9p15hLJyZouFPEVCK2t6I,2036
|
|
71
71
|
operate/quickstart/terminate_on_chain_service.py,sha256=5ENU8_mkj06i80lKUX-v1QbLU0YzKeOZDUL1e_jzySE,2914
|
|
72
72
|
operate/quickstart/utils.py,sha256=rmd9e7whQIsYpRKqWBEQxMA_SHrivBg6DppFY5ECtQQ,9135
|
|
@@ -86,8 +86,8 @@ operate/utils/gnosis.py,sha256=CS07ZqvrO7uelkFe09VMyPBcLzKONUI1ZqFvi41BDhc,17924
|
|
|
86
86
|
operate/utils/ssl.py,sha256=O5DrDoZD4T4qQuHP8GLwWUVxQ-1qXeefGp6uDJiF2lM,4308
|
|
87
87
|
operate/wallet/__init__.py,sha256=NGiozD3XhvkBi7_FaOWQ8x1thZPK4uGpokJaeDY_o2w,813
|
|
88
88
|
operate/wallet/master.py,sha256=MGXynIV0LQU3n28AceK7RlaxAtfsVowsXzisesG4iJM,30760
|
|
89
|
-
olas_operate_middleware-0.10.
|
|
90
|
-
olas_operate_middleware-0.10.
|
|
91
|
-
olas_operate_middleware-0.10.
|
|
92
|
-
olas_operate_middleware-0.10.
|
|
93
|
-
olas_operate_middleware-0.10.
|
|
89
|
+
olas_operate_middleware-0.10.3.dist-info/LICENSE,sha256=mdBDB-mWKV5Cz4ejBzBiKqan6Z8zVLAh9xwM64O2FW4,11339
|
|
90
|
+
olas_operate_middleware-0.10.3.dist-info/METADATA,sha256=0kyC2FK8gU3XWWtXMKZwSNJ-0LLB6UEQj1v3UhVLy4g,2034
|
|
91
|
+
olas_operate_middleware-0.10.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
92
|
+
olas_operate_middleware-0.10.3.dist-info/entry_points.txt,sha256=dM1g2I7ODApKQFcgl5J4NGA7pfBTo6qsUTXM-j2OLlw,44
|
|
93
|
+
olas_operate_middleware-0.10.3.dist-info/RECORD,,
|
|
@@ -103,6 +103,7 @@ RELAY_DEFAULT_GAS = {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
# https://docs.relay.link/guides/bridging#status-values
|
|
106
107
|
class RelayExecutionStatus(str, enum.Enum):
|
|
107
108
|
"""Relay execution status."""
|
|
108
109
|
|
|
@@ -366,7 +367,6 @@ class RelayProvider(Provider):
|
|
|
366
367
|
provider_request.status = ProviderRequestStatus.EXECUTION_FAILED
|
|
367
368
|
return
|
|
368
369
|
|
|
369
|
-
relay_status = RelayExecutionStatus.WAITING
|
|
370
370
|
url = "https://api.relay.link/requests/v2"
|
|
371
371
|
headers = {"accept": "application/json"}
|
|
372
372
|
params = {
|
|
@@ -384,11 +384,16 @@ class RelayProvider(Provider):
|
|
|
384
384
|
"status", str(RelayExecutionStatus.WAITING)
|
|
385
385
|
)
|
|
386
386
|
execution_data.message = str(relay_status)
|
|
387
|
+
else:
|
|
388
|
+
provider_request.status = ProviderRequestStatus.EXECUTION_UNKNOWN
|
|
389
|
+
return
|
|
387
390
|
response.raise_for_status()
|
|
388
391
|
except Exception as e:
|
|
389
392
|
self.logger.error(
|
|
390
393
|
f"[RELAY PROVIDER] Failed to update status for request {provider_request.id}: {e}"
|
|
391
394
|
)
|
|
395
|
+
provider_request.status = ProviderRequestStatus.EXECUTION_UNKNOWN
|
|
396
|
+
return
|
|
392
397
|
|
|
393
398
|
if relay_status == RelayExecutionStatus.SUCCESS:
|
|
394
399
|
self.logger.info(
|
|
@@ -422,6 +427,7 @@ class RelayProvider(Provider):
|
|
|
422
427
|
elif relay_status in (
|
|
423
428
|
RelayExecutionStatus.PENDING,
|
|
424
429
|
RelayExecutionStatus.DELAYED,
|
|
430
|
+
RelayExecutionStatus.WAITING,
|
|
425
431
|
):
|
|
426
432
|
provider_request.status = ProviderRequestStatus.EXECUTION_PENDING
|
|
427
433
|
else:
|
operate/keys.py
CHANGED
|
@@ -63,10 +63,7 @@ class KeysManager(metaclass=SingletonMeta):
|
|
|
63
63
|
|
|
64
64
|
self.path = kwargs["path"]
|
|
65
65
|
self.logger = kwargs["logger"]
|
|
66
|
-
|
|
67
|
-
def setup(self) -> None:
|
|
68
|
-
"""Setup service manager."""
|
|
69
|
-
self.path.mkdir(exist_ok=True)
|
|
66
|
+
self.path.mkdir(exist_ok=True, parents=True)
|
|
70
67
|
|
|
71
68
|
def get(self, key: str) -> Key:
|
|
72
69
|
"""Get key object."""
|
|
@@ -88,15 +85,31 @@ class KeysManager(metaclass=SingletonMeta):
|
|
|
88
85
|
)
|
|
89
86
|
)
|
|
90
87
|
)
|
|
91
|
-
with
|
|
88
|
+
# Create temporary file with delete=False to handle it manually
|
|
89
|
+
with tempfile.NamedTemporaryFile(
|
|
90
|
+
dir=self.path,
|
|
91
|
+
mode="w",
|
|
92
|
+
suffix=".txt",
|
|
93
|
+
delete=False, # Handle cleanup manually
|
|
94
|
+
) as temp_file:
|
|
92
95
|
temp_file.write(key.private_key)
|
|
93
96
|
temp_file.flush()
|
|
97
|
+
temp_file.close() # Close the file before reading
|
|
98
|
+
|
|
99
|
+
# Set proper file permissions (readable by owner only)
|
|
100
|
+
os.chmod(temp_file.name, 0o600)
|
|
94
101
|
crypto = EthereumCrypto(private_key_path=temp_file.name)
|
|
95
102
|
|
|
103
|
+
try:
|
|
104
|
+
os.unlink(temp_file.name) # Clean up the temporary file
|
|
105
|
+
except OSError as e:
|
|
106
|
+
self.logger.error(f"Failed to delete temp file {temp_file.name}: {e}")
|
|
107
|
+
|
|
96
108
|
return crypto
|
|
97
109
|
|
|
98
110
|
def create(self) -> str:
|
|
99
111
|
"""Creates new key."""
|
|
112
|
+
self.path.mkdir(exist_ok=True, parents=True)
|
|
100
113
|
crypto = EthereumCrypto()
|
|
101
114
|
for path in (
|
|
102
115
|
self.path / f"{crypto.address}.bak",
|
|
@@ -665,8 +665,6 @@ def run_service(
|
|
|
665
665
|
|
|
666
666
|
print_title(f"{template['name']} quickstart")
|
|
667
667
|
|
|
668
|
-
operate.service_manager().migrate_service_configs()
|
|
669
|
-
operate.wallet_manager.migrate_wallet_configs()
|
|
670
668
|
ask_password_if_needed(operate)
|
|
671
669
|
_maybe_create_master_eoa(operate)
|
|
672
670
|
|
{olas_operate_middleware-0.10.1.dist-info → olas_operate_middleware-0.10.3.dist-info}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|