Skip to content

Unify DeployAccount#138

Merged
cpb8010 merged 10 commits intomainfrom
ecdsa-sdk
May 22, 2025
Merged

Unify DeployAccount#138
cpb8010 merged 10 commits intomainfrom
ecdsa-sdk

Conversation

@cpb8010
Copy link
Contributor

@cpb8010 cpb8010 commented May 19, 2025

Description

A new unified create account interface that can create a passkey account with an ECDSA owner and session.

Additional context

This is a no-front-end changes version of the ecdsa-auth-server change set

The goal is to keep the e2e tests passing as we merge a branch where
they fail.
@cpb8010 cpb8010 self-assigned this May 19, 2025
@cpb8010 cpb8010 requested a review from Copilot May 19, 2025 15:57
@github-actions
Copy link

github-actions bot commented May 19, 2025

Visit the preview URL for this PR (updated for commit d00f116):

https://zksync-auth-server-staging--pr138-ecdsa-sdk-lw7yngx8.web.app

(expires Thu, 29 May 2025 15:35:11 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 509a9c9ea42583076f531c53cf2979c544d5d0b7

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

A new unified create account interface that adds support for passkey-based account creation and refactors the modular deploy flow without front-end changes.

  • Refactored packages/sdk/src/client/passkey/actions/account.ts to introduce DeployAccountPasskeyArgs, new encodePasskeyModuleData and fetchAccount helpers, and cleaned up legacy code.
  • Updated tests in account.test.ts to target the new public API and added mocks for parseEventLogs.
  • Added a new high-level deployModularAccount in packages/sdk/src/client/index.ts to combine ECDSA, session, passkey, and paymaster modules.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/sdk/src/client/passkey/actions/account.ts Extracted passkey module encoding, added fetchAccount, removed legacy fetch/deploy.
packages/sdk/src/client/passkey/actions/account.test.ts Updated imports, mocks, and test cases to exercise the new API.
packages/sdk/src/client/index.ts Introduced deployModularAccount to unify modules and handle paymaster.
packages/sdk/src/client/ecdsa/actions/account.ts Stripped out legacy deploy code, kept only ECDSA fetch logic.
.vscode/settings.json Added JSON/JSONC formatter and NX Console AI rules.
.github/instructions/nx.instructions.md Added NX workspace instructions file (auto-generated).
Comments suppressed due to low confidence (1)

packages/sdk/src/client/index.ts:104

  • [nitpick] The error message is ambiguous when the AccountCreated event is missing. Consider changing it to AccountCreated event not found in transaction receipt for clarity.
throw new Error("No contract address in transaction receipt");

cpb8010 and others added 3 commits May 19, 2025 09:07
thanks AI!

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
still fails locally? Trying to undo any breaking changes
thanks AI

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cpb8010 cpb8010 changed the title ECDSA SDK Unify DeployAccount May 20, 2025
cpb8010 added 2 commits May 19, 2025 22:01
still isn't using the new factory entry point,
but it would be easier to use it if needed!

Also add support for recovery, if provided by client
Can be saved or used later, mostly as a demo to show all 3 signer
types together.
@cpb8010 cpb8010 added the enhancement New feature or request label May 20, 2025
jackpooleyml
jackpooleyml previously approved these changes May 21, 2025
Copy link
Contributor

@jackpooleyml jackpooleyml left a comment

Choose a reason for hiding this comment

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

LGTM

cpb8010 added 2 commits May 21, 2025 23:13
We want this to be new tests with a new name, not losing the old name
tests!
@cpb8010 cpb8010 enabled auto-merge (squash) May 22, 2025 15:35
@cpb8010 cpb8010 merged commit b47558d into main May 22, 2025
10 checks passed
@cpb8010 cpb8010 deleted the ecdsa-sdk branch May 22, 2025 15:50
cpb8010 added a commit that referenced this pull request Jul 16, 2025
* feat: get new sdk changes

The goal is to keep the e2e tests passing as we merge a branch where
they fail.

* Update packages/sdk/src/client/index.ts

thanks AI!

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: attempt to undo more changes

still fails locally? Trying to undo any breaking changes

* Update packages/sdk/src/client/passkey/actions/account.test.ts

thanks AI

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: use new modular account interface

still isn't using the new factory entry point,
but it would be easier to use it if needed!

Also add support for recovery, if provided by client

* feat: create throwaway owner on deployment

Can be saved or used later, mostly as a demo to show all 3 signer
types together.

* fix: undo test renaming

We want this to be new tests with a new name, not losing the old name
tests!

* fix: fully revert passkey deploy test changes

Other updates were made that broke things

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants