primecli 0.11.1__tar.gz → 0.11.2__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.
- {primecli-0.11.1 → primecli-0.11.2}/PKG-INFO +2 -2
- {primecli-0.11.1 → primecli-0.11.2}/README.md +1 -1
- {primecli-0.11.1 → primecli-0.11.2}/primecli/degenprime.py +8 -6
- {primecli-0.11.1 → primecli-0.11.2}/primecli.egg-info/PKG-INFO +2 -2
- {primecli-0.11.1 → primecli-0.11.2}/pyproject.toml +1 -1
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_paraswap_requote.py +24 -0
- {primecli-0.11.1 → primecli-0.11.2}/LICENSE +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/__init__.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/_flowledger.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/_wallets.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/arbprime.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/bridge.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/deltaprime.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli/health_monitor.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli.egg-info/SOURCES.txt +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli.egg-info/dependency_links.txt +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli.egg-info/entry_points.txt +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli.egg-info/requires.txt +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/primecli.egg-info/top_level.txt +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/setup.cfg +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_aero_range_and_swap_fallback.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_aero_rebalance.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_aero_v3_collision_fixes.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_bridge.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_cross_file_identity.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_flowledger_transferred_amount.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_gas_limit.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_gas_pricing.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_health_meter.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_health_monitor.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_paraswap_validator.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_redstone_encoding.py +0 -0
- {primecli-0.11.1 → primecli-0.11.2}/tests/test_to_wei_units.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: primecli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Agent-friendly CLI tools for the DeltaPrime (Avalanche + Arbitrum) and DegenPrime (Base) lending and leverage protocols. Preview-by-default; no Etherscan key required.
|
|
5
5
|
Author: Mnemosyne-quest contributors
|
|
6
6
|
License: MIT
|
|
@@ -47,7 +47,7 @@ Built for agent use:
|
|
|
47
47
|
- RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
|
|
48
48
|
- ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
|
|
49
49
|
|
|
50
|
-
**Current version:** 0.11.
|
|
50
|
+
**Current version:** 0.11.2 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
|
|
51
51
|
|
|
52
52
|
> **Breaking change in 0.5.0:** there is no longer a default signing key. Earlier versions silently fell back to a baked-in agent when no key was configured; that fallback has been removed. With no key configured, every command now fails closed with `No signing key found...`. Set a key explicitly (see [Configuration](#configuration)).
|
|
53
53
|
|
|
@@ -16,7 +16,7 @@ Built for agent use:
|
|
|
16
16
|
- RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
|
|
17
17
|
- ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
|
|
18
18
|
|
|
19
|
-
**Current version:** 0.11.
|
|
19
|
+
**Current version:** 0.11.2 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
|
|
20
20
|
|
|
21
21
|
> **Breaking change in 0.5.0:** there is no longer a default signing key. Earlier versions silently fell back to a baked-in agent when no key was configured; that fallback has been removed. With no key configured, every command now fails closed with `No signing key found...`. Set a key explicitly (see [Configuration](#configuration)).
|
|
22
22
|
|
|
@@ -3152,17 +3152,19 @@ def _swap_asset_meta(w3, symbol: str):
|
|
|
3152
3152
|
def _paraswap_price_route(src_token, src_dec, dest_token, dest_dec, amount_in_wei, user_addr):
|
|
3153
3153
|
"""ParaSwap /prices on Base (network=8453, v6.2). Returns the priceRoute dict for a
|
|
3154
3154
|
SELL of amount_in_wei src->dest. The priceRoute is passed verbatim to /transactions.
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3155
|
+
includeContractMethods pins the API to exactly the two router methods the facet can
|
|
3156
|
+
decode (PARASWAP_SUPPORTED_SELECTORS) - an allowlist, not a blocklist, so a future
|
|
3157
|
+
ParaSwap route type the facet still can't decode is excluded by construction instead
|
|
3158
|
+
of needing a matching blocklist entry. excludeDEXS drops the RFQ/maker sources
|
|
3159
|
+
(AugustusRFQ, Hashflow, etc.) up front: those won't fill for a contract caller and
|
|
3160
|
+
are the prime SwapFailed() culprits - cutting them at the quote keeps the re-quote
|
|
3161
|
+
loop from churning through routes that can never simulate clean."""
|
|
3160
3162
|
params = {
|
|
3161
3163
|
"srcToken": src_token, "srcDecimals": src_dec,
|
|
3162
3164
|
"destToken": dest_token, "destDecimals": dest_dec,
|
|
3163
3165
|
"amount": str(amount_in_wei), "side": "SELL",
|
|
3164
3166
|
"network": CHAIN_ID, "version": "6.2", "userAddress": user_addr,
|
|
3165
|
-
"
|
|
3167
|
+
"includeContractMethods": "swapExactAmountIn,swapExactAmountInOnUniswapV3",
|
|
3166
3168
|
"excludeDEXS": "AugustusRFQ,ParaSwapLimitOrders,Hashflow,Bebop,Swaap,SwaapV2,DexalotRFQ,NativeV1,Clipper,Metric,MetricRFQ",
|
|
3167
3169
|
}
|
|
3168
3170
|
r = requests.get(f"{PARASWAP_API}/prices", params=params,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: primecli
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.2
|
|
4
4
|
Summary: Agent-friendly CLI tools for the DeltaPrime (Avalanche + Arbitrum) and DegenPrime (Base) lending and leverage protocols. Preview-by-default; no Etherscan key required.
|
|
5
5
|
Author: Mnemosyne-quest contributors
|
|
6
6
|
License: MIT
|
|
@@ -47,7 +47,7 @@ Built for agent use:
|
|
|
47
47
|
- RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
|
|
48
48
|
- ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
|
|
49
49
|
|
|
50
|
-
**Current version:** 0.11.
|
|
50
|
+
**Current version:** 0.11.2 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
|
|
51
51
|
|
|
52
52
|
> **Breaking change in 0.5.0:** there is no longer a default signing key. Earlier versions silently fell back to a baked-in agent when no key was configured; that fallback has been removed. With no key configured, every command now fails closed with `No signing key found...`. Set a key explicitly (see [Configuration](#configuration)).
|
|
53
53
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "primecli"
|
|
7
|
-
version = "0.11.
|
|
7
|
+
version = "0.11.2"
|
|
8
8
|
description = "Agent-friendly CLI tools for the DeltaPrime (Avalanche + Arbitrum) and DegenPrime (Base) lending and leverage protocols. Preview-by-default; no Etherscan key required."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -141,3 +141,27 @@ def test_price_route_excludes_rfq_dexs(monkeypatch):
|
|
|
141
141
|
excluded = captured["params"]["excludeDEXS"]
|
|
142
142
|
assert "AugustusRFQ" in excluded
|
|
143
143
|
assert "ParaSwapLimitOrders" in excluded
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def test_price_route_pins_include_contract_methods(monkeypatch):
|
|
147
|
+
"""`_paraswap_price_route` must allowlist via includeContractMethods (not
|
|
148
|
+
blocklist via excludeContractMethods) so a future ParaSwap route type the facet
|
|
149
|
+
still can't decode is excluded by construction, matching PARASWAP_SUPPORTED_SELECTORS
|
|
150
|
+
(swapExactAmountIn / swapExactAmountInOnUniswapV3)."""
|
|
151
|
+
captured = {}
|
|
152
|
+
|
|
153
|
+
class _Resp:
|
|
154
|
+
@staticmethod
|
|
155
|
+
def json():
|
|
156
|
+
return {"priceRoute": {"destAmount": "1"}}
|
|
157
|
+
|
|
158
|
+
def fake_get(url, params=None, headers=None, timeout=None):
|
|
159
|
+
captured["params"] = params
|
|
160
|
+
return _Resp()
|
|
161
|
+
|
|
162
|
+
monkeypatch.setattr(dp.requests, "get", fake_get)
|
|
163
|
+
dp._paraswap_price_route(SRC, 18, DEST, 6, AMOUNT, PA)
|
|
164
|
+
params = captured["params"]
|
|
165
|
+
assert "excludeContractMethods" not in params
|
|
166
|
+
included = set(params["includeContractMethods"].split(","))
|
|
167
|
+
assert included == {"swapExactAmountIn", "swapExactAmountInOnUniswapV3"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|