Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changelog/quick-crabs-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
pympp: patch
---

Raised `DEFAULT_GAS_LIMIT` from 100,000 to 1,000,000 for Tempo AA (type-0x76) transactions to account for their higher intrinsic gas cost (~270k for a single TIP-20 transfer).
5 changes: 4 additions & 1 deletion src/mpp/methods/tempo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
from mpp.server.intent import Intent


DEFAULT_GAS_LIMIT = 100_000
# Tempo AA (type-0x76) transactions have higher intrinsic gas than legacy txs
# (~270k for a single TIP-20 transfer). A safe static limit avoids the need for
# AA-aware eth_estimateGas calls, matching the approach used by mpp-rs.
DEFAULT_GAS_LIMIT = 1_000_000
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use 1M gas only as the estimation fallback

Because _build_tempo_transfer() later does gas_limit = max(DEFAULT_GAS_LIMIT, estimated + 5_000), raising DEFAULT_GAS_LIMIT to 1_000_000 makes every Tempo transaction carry a 1M cap, even when eth_estimateGas succeeds with a much smaller AA cost (~270k). For self-paid transfers (fee_token=currency) and fee-payer flows alike, Tempo validates balances against gas_limit * max_fee_per_gas before execution, so accounts that can afford the real gas but not a 1M reserve will now fail with insufficient-funds errors. The larger number should be kept as the fallback when estimation fails, not as the floor for all transactions.

Useful? React with 👍 / 👎.

EXPIRING_NONCE_KEY = (1 << 256) - 1 # U256::MAX
FEE_PAYER_VALID_BEFORE_SECS = 25

Expand Down