Skip to content

Allow 7702 cross-contract calls to target a specific ephemeral account - #138

Draft
mattgle wants to merge 1 commit into
zy0n/7702-base-mainfrom
feat/7702-reclaim-from-any-ephemeral
Draft

Allow 7702 cross-contract calls to target a specific ephemeral account#138
mattgle wants to merge 1 commit into
zy0n/7702-base-mainfrom
feat/7702-reclaim-from-any-ephemeral

Conversation

@mattgle

@mattgle mattgle commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Funds can be stranded on an ephemeral account once the index rotates past it — a swap that reverts on slippage leaves them behind. The 7702 cross-contract entry points resolve the ephemeral account internally through getCurrentEphemeralAddress, so a caller cannot build a batch against the account that actually holds the funds and they stay unreachable.

This adds an optional trailing ephemeralIndex to gasEstimateForUnprovenCrossContractCalls7702 and generateCrossContractCallsProof7702. When set, the unshield recipient, the EIP-7702 authorization authority and the nonce all resolve to that one account, reusing the engine's existing ephemeralWalletOverride scoped in a try/finally so the shared override is always restored. Omit it and behaviour is byte-identical to today.

Draft for your call on two things: whether you want this in #131 rather than stacked on it, and whether the unshield paths (tx-unshield, tx-unshield-base-token-7702, tx-proof-unshield) should take the same parameter — they still hard-wire the current account.

@mattgle mattgle self-assigned this Aug 21, 2026
@tom332

tom332 commented Sep 3, 2026

Copy link
Copy Markdown

[BUG] Critical Fallback Routing Failure: 50,551 USDC Trapped in Relay Adapt Contract via Safe Unshield Loop
#140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants