primecli 0.5.0__tar.gz → 0.5.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primecli
3
- Version: 0.5.0
3
+ Version: 0.5.1
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
@@ -48,7 +48,7 @@ Built for agent use:
48
48
  - RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
49
49
  - ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
50
50
 
51
- **Current version:** 0.5.0 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
51
+ **Current version:** 0.5.1 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
52
52
 
53
53
  > **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)).
54
54
 
@@ -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.5.0 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
19
+ **Current version:** 0.5.1 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
 
@@ -660,7 +660,10 @@ def _set_gas_price(w3, tx_dict):
660
660
  """Set appropriate gas price fields for the chain, replacing the legacy gasPrice approach.
661
661
  On EIP-1559 chains (Arbitrum, Base): sets maxFeePerGas + maxPriorityFeePerGas with a 2x
662
662
  base-fee hedge (base + prio + 1 gwei buffer). On Avalanche (legacy): sets gasPrice at
663
- 2x base fee with a 25 gwei floor, matching the old _tx_gas_price semantics for this chain."""
663
+ 2x base fee with a 1 gwei floor. (25 gwei was the pre-Etna C-chain minimum;
664
+ ACP-125 (Dec 2024) lowered the min base fee to 1 nAVAX — base now sits at ~0.01
665
+ nAVAX, so a 25 gwei floor overpaid ~2500x and inflated the upfront balance
666
+ requirement past small EOAs.)"""
664
667
  tx_dict.pop("gasPrice", None)
665
668
  if CHAIN_ID in (42161, 8453): # Arbitrum, Base — EIP-1559
666
669
  base = w3.eth.gas_price
@@ -668,13 +671,13 @@ def _set_gas_price(w3, tx_dict):
668
671
  tx_dict["maxFeePerGas"] = max(int(base * 2), base + prio + 10**9)
669
672
  tx_dict["maxPriorityFeePerGas"] = prio
670
673
  else: # Avalanche (43114) — legacy gasPrice
671
- tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 25 * 10**9)
674
+ tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 1 * 10**9)
672
675
 
673
676
  def _set_gas_price_for(chain_id, w3, tx_dict):
674
677
  """Set gas fields for an EXPLICIT chain_id rather than the module CHAIN_ID. Needed by
675
678
  cross-chain flows (prime-bridge) where a tx may target Avalanche or Arbitrum regardless
676
679
  of which tool built it. Arbitrum/Base (EIP-1559): maxFeePerGas + maxPriorityFeePerGas;
677
- Avalanche (legacy): gasPrice with a 25 gwei floor."""
680
+ Avalanche (legacy): gasPrice with a 1 gwei floor (post-Etna; see _set_gas_price)."""
678
681
  tx_dict.pop("gasPrice", None)
679
682
  if chain_id in (42161, 8453): # Arbitrum, Base — EIP-1559
680
683
  base = w3.eth.gas_price
@@ -682,7 +685,7 @@ def _set_gas_price_for(chain_id, w3, tx_dict):
682
685
  tx_dict["maxFeePerGas"] = max(int(base * 2), base + prio + 10**9)
683
686
  tx_dict["maxPriorityFeePerGas"] = prio
684
687
  else: # Avalanche (43114) — legacy gasPrice
685
- tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 25 * 10**9)
688
+ tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 1 * 10**9)
686
689
 
687
690
  def _read_env_var(path, var):
688
691
  """Return the value of `var` from a KEY=VALUE env file, or None if absent."""
@@ -236,7 +236,10 @@ def _set_gas_price(w3, tx_dict):
236
236
  """Set appropriate gas price fields for the chain, replacing the legacy gasPrice approach.
237
237
  On EIP-1559 chains (Arbitrum, Base): sets maxFeePerGas + maxPriorityFeePerGas with a 2x
238
238
  base-fee hedge (base + prio + 1 gwei buffer). On Avalanche (legacy): sets gasPrice at
239
- 2x base fee with a 25 gwei floor, matching the old _tx_gas_price semantics for this chain."""
239
+ 2x base fee with a 1 gwei floor. (25 gwei was the pre-Etna C-chain minimum;
240
+ ACP-125 (Dec 2024) lowered the min base fee to 1 nAVAX — base now sits at ~0.01
241
+ nAVAX, so a 25 gwei floor overpaid ~2500x and inflated the upfront balance
242
+ requirement past small EOAs.)"""
240
243
  tx_dict.pop("gasPrice", None)
241
244
  if CHAIN_ID in (42161, 8453): # Arbitrum, Base — EIP-1559
242
245
  base = w3.eth.gas_price
@@ -244,7 +247,7 @@ def _set_gas_price(w3, tx_dict):
244
247
  tx_dict["maxFeePerGas"] = max(int(base * 2), base + prio + 10**9)
245
248
  tx_dict["maxPriorityFeePerGas"] = prio
246
249
  else: # Avalanche (43114) — legacy gasPrice
247
- tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 25 * 10**9)
250
+ tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 1 * 10**9)
248
251
  def resolve_private_key():
249
252
  """Resolve the signing key per the documented precedence:
250
253
  1. --key <0xhex> CLI flag
@@ -660,7 +660,10 @@ def _set_gas_price(w3, tx_dict):
660
660
  """Set appropriate gas price fields for the chain, replacing the legacy gasPrice approach.
661
661
  On EIP-1559 chains (Arbitrum, Base): sets maxFeePerGas + maxPriorityFeePerGas with a 2x
662
662
  base-fee hedge (base + prio + 1 gwei buffer). On Avalanche (legacy): sets gasPrice at
663
- 2x base fee with a 25 gwei floor, matching the old _tx_gas_price semantics for this chain."""
663
+ 2x base fee with a 1 gwei floor. (25 gwei was the pre-Etna C-chain minimum;
664
+ ACP-125 (Dec 2024) lowered the min base fee to 1 nAVAX — base now sits at ~0.01
665
+ nAVAX, so a 25 gwei floor overpaid ~2500x and inflated the upfront balance
666
+ requirement past small EOAs.)"""
664
667
  tx_dict.pop("gasPrice", None)
665
668
  if CHAIN_ID in (42161, 8453): # Arbitrum, Base — EIP-1559
666
669
  base = w3.eth.gas_price
@@ -668,13 +671,13 @@ def _set_gas_price(w3, tx_dict):
668
671
  tx_dict["maxFeePerGas"] = max(int(base * 2), base + prio + 10**9)
669
672
  tx_dict["maxPriorityFeePerGas"] = prio
670
673
  else: # Avalanche (43114) — legacy gasPrice
671
- tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 25 * 10**9)
674
+ tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 1 * 10**9)
672
675
 
673
676
  def _set_gas_price_for(chain_id, w3, tx_dict):
674
677
  """Set gas fields for an EXPLICIT chain_id rather than the module CHAIN_ID. Needed by
675
678
  cross-chain flows (prime-bridge) where a tx may target Avalanche or Arbitrum regardless
676
679
  of which tool built it. Arbitrum/Base (EIP-1559): maxFeePerGas + maxPriorityFeePerGas;
677
- Avalanche (legacy): gasPrice with a 25 gwei floor."""
680
+ Avalanche (legacy): gasPrice with a 1 gwei floor (post-Etna; see _set_gas_price)."""
678
681
  tx_dict.pop("gasPrice", None)
679
682
  if chain_id in (42161, 8453): # Arbitrum, Base — EIP-1559
680
683
  base = w3.eth.gas_price
@@ -682,7 +685,7 @@ def _set_gas_price_for(chain_id, w3, tx_dict):
682
685
  tx_dict["maxFeePerGas"] = max(int(base * 2), base + prio + 10**9)
683
686
  tx_dict["maxPriorityFeePerGas"] = prio
684
687
  else: # Avalanche (43114) — legacy gasPrice
685
- tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 25 * 10**9)
688
+ tx_dict["gasPrice"] = max(int(w3.eth.gas_price * 2), 1 * 10**9)
686
689
 
687
690
  def _read_env_var(path, var):
688
691
  """Return the value of `var` from a KEY=VALUE env file, or None if absent."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primecli
3
- Version: 0.5.0
3
+ Version: 0.5.1
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
@@ -48,7 +48,7 @@ Built for agent use:
48
48
  - RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
49
49
  - ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
50
50
 
51
- **Current version:** 0.5.0 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
51
+ **Current version:** 0.5.1 The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
52
52
 
53
53
  > **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)).
54
54
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "primecli"
7
- version = "0.5.0"
7
+ version = "0.5.1"
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"
@@ -4,7 +4,7 @@ This helper sets gas fields for an explicit chain id (used by cross-chain flows
4
4
  like prime-bridge), so it must pick the right fee model per chain:
5
5
  * Arbitrum (42161) / Base (8453): EIP-1559 — maxFeePerGas + maxPriorityFeePerGas,
6
6
  and NO legacy gasPrice.
7
- * Avalanche (43114): legacy gasPrice with a 25 gwei floor, and NO EIP-1559 fields.
7
+ * Avalanche (43114): legacy gasPrice with a 1 gwei floor (post-Etna), and NO EIP-1559 fields.
8
8
 
9
9
  No RPC is made: we feed a stub w3 whose `eth.gas_price` / `eth.max_priority_fee`
10
10
  return canned values. The helper is duplicated in both modules, so both are tested.
@@ -82,11 +82,11 @@ def test_base_sets_eip1559_no_gasprice(mod):
82
82
 
83
83
 
84
84
  # ──────────────────────────────────────────────────────────────────────────────
85
- # Avalanche (43114) — legacy gasPrice with 25 gwei floor
85
+ # Avalanche (43114) — legacy gasPrice with 1 gwei floor (post-Etna ACP-125)
86
86
 
87
87
 
88
88
  def test_avalanche_sets_legacy_gasprice_no_eip1559(mod):
89
- # gas_price*2 (60 gwei) > 25 gwei floor → uses doubled value
89
+ # gas_price*2 (60 gwei) > 1 gwei floor → uses doubled value
90
90
  w3 = _StubW3(gas_price=30 * GWEI, max_priority_fee=1 * GWEI)
91
91
  tx = {}
92
92
  mod._set_gas_price_for(43114, w3, tx)
@@ -95,11 +95,11 @@ def test_avalanche_sets_legacy_gasprice_no_eip1559(mod):
95
95
  assert "maxPriorityFeePerGas" not in tx
96
96
 
97
97
 
98
- def test_avalanche_applies_25_gwei_floor(mod):
99
- # gas_price*2 (10 gwei) < 25 gwei floor → floor wins
100
- w3 = _StubW3(gas_price=5 * GWEI, max_priority_fee=1 * GWEI)
98
+ def test_avalanche_applies_1_gwei_floor(mod):
99
+ # gas_price*2 (0.02 gwei, realistic post-Etna base) < 1 gwei floor → floor wins
100
+ w3 = _StubW3(gas_price=GWEI // 100, max_priority_fee=1 * GWEI)
101
101
  tx = {"gasPrice": 1} # stale value replaced, not added-to
102
102
  mod._set_gas_price_for(43114, w3, tx)
103
- assert tx["gasPrice"] == 25 * GWEI
103
+ assert tx["gasPrice"] == 1 * GWEI
104
104
  assert "maxFeePerGas" not in tx
105
105
  assert "maxPriorityFeePerGas" not in tx
File without changes
File without changes
File without changes