Zy0n/7702 base main#131
Open
zy0n wants to merge 8 commits into
Open
Conversation
…er derivation The EIP-7702 ephemeral signer was derived from the password-less seed, while the wallet's spending keys and address derive from the password-protected seed. Mirror the engine fix: the ephemeral wrappers (getCurrentEphemeralWallet/Address, sign7702Request) and EphemeralKeyManager now pass the mnemonic password to the engine derivation (which now requires it for password-protected wallets), and the 7702 cross-contract callers forward it. Also route the manager's index ratchet and history scan through the engine's atomic incrementEphemeralKeyIndex / setEphemeralKeyIndexIfGreater so concurrent callers can't reuse the same ephemeral key/nonce.
…702 path The cross-contract 7702 path forwarded the mnemonic password to the ephemeral signer calls, but the unshield-base-token 7702 path did not: getCurrentEphemeralAddress and sign7702Request were called without it, and createUnshieldBaseTokenTransaction7702 lacked the parameter entirely. For a password-protected wallet that path failed the engine's password assertion. Thread mnemonicPassword through it to match the cross-contract path.
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.
This pull request introduces support for EIP-7702 relay-adapt contracts and ephemeral account management, along with related utilities and comprehensive tests. Key changes include adding new modules for ephemeral key management, extending provider loading logic to handle 7702 contracts, and implementing execution helpers for relay-adapt-7702. The update also increases the provider polling interval and adds robust test coverage for the new functionality.
EIP-7702 and Relay-Adapt Contract Integration:
load-provider.tsto detect and load relay-adapt-7702 contracts and their execution types, including support forrelayAdapt7702ContractandrailgunRegistryContractwhen the network supports 7702. The provider polling interval was also increased to 60 seconds. [1] [2] [3] [4] [5]poi-validation.tsandextract-transaction-data.tsto support auseRelayAdapt7702parameter, ensuring correct contract address selection and transaction handling for 7702-enabled flows. [1] [2] [3] [4] [5] [6]Ephemeral Account and Key Management:
ephemeral-account.tsandephemeral-key-manager.tsto manage ephemeral accounts and indexes, with logic to scan transaction history for index recovery. [1] [2]Relay-Adapt-7702 Execution Utilities:
relay-adapt-7702-execution.tswith helpers to determine execution type per network, read/handle execute nonces, and encode relay-adapt-7702 execute calls.Testing:
Miscellaneous:
These changes collectively enable advanced ephemeral account workflows and support for EIP-7702 relay-adapt contracts, improving flexibility and future-proofing the wallet infrastructure.