Allow 7702 cross-contract calls to target a specific ephemeral account - #138
Draft
mattgle wants to merge 1 commit into
Draft
Allow 7702 cross-contract calls to target a specific ephemeral account#138mattgle wants to merge 1 commit into
mattgle wants to merge 1 commit into
Conversation
|
[BUG] Critical Fallback Routing Failure: 50,551 USDC Trapped in Relay Adapt Contract via Safe Unshield Loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
ephemeralIndextogasEstimateForUnprovenCrossContractCalls7702andgenerateCrossContractCallsProof7702. When set, the unshield recipient, the EIP-7702 authorization authority and the nonce all resolve to that one account, reusing the engine's existingephemeralWalletOverridescoped in atry/finallyso 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.