Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add zod runtime validation for base account #186

Merged

Conversation

avasisht23
Copy link
Contributor

@avasisht23 avasisht23 commented Oct 30, 2023

Add zod runtime validation for base account.


PR-Codex overview

This PR focuses on adding new schemas and types for smart account providers and accounts.

Detailed summary:

  • Added SignerSchema for validating smart account signers.
  • Added ChainSchema for validating chain objects.
  • Added createPublicErc4337ClientSchema for validating public ERC4337 clients.
  • Updated createSmartAccountProviderConfigSchema to use the new schemas and types.
  • Updated createBaseSmartAccountParamsSchema to use the new schemas and types.
  • Updated imports and types in various files.

The following files were skipped due to too many changes: packages/core/src/account/__tests__/simple.test.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link
Contributor

@denniswon denniswon left a comment

Choose a reason for hiding this comment

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

Other than what's commented inline, LGTM

@avasisht23 avasisht23 force-pushed the 10-30-feat_remove_sub-account_support_for_light_account branch from 75eae27 to ab6a936 Compare October 31, 2023 01:19
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_base_account branch from 699ffa9 to 45938b6 Compare October 31, 2023 01:19
Base automatically changed from 10-30-feat_remove_sub-account_support_for_light_account to development October 31, 2023 01:42
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_base_account branch from 45938b6 to c9f6992 Compare October 31, 2023 03:30
Copy link
Collaborator

@moldy530 moldy530 left a comment

Choose a reason for hiding this comment

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

can we break out these common refine functions into some kind of refinement util?

The chain and client ones especially are used in other places

or even provide them as the full schema: export const zThingSchem = z.any().refine<Thing>(() => ) then we just import them there

@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_base_account branch from c9f6992 to ded9808 Compare November 1, 2023 15:37
@moldy530 moldy530 merged commit 1c5e368 into development Nov 1, 2023
3 checks passed
@moldy530 moldy530 deleted the 10-30-feat_add_zod_runtime_validation_for_base_account branch November 1, 2023 17:19
avasisht23 added a commit that referenced this pull request Nov 3, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
avasisht23 added a commit that referenced this pull request Nov 3, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
@moldy530 moldy530 mentioned this pull request Nov 10, 2023
moldy530 pushed a commit that referenced this pull request Nov 10, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
avasisht23 added a commit that referenced this pull request Nov 14, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
avasisht23 added a commit that referenced this pull request Nov 14, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
denniswon pushed a commit that referenced this pull request Nov 16, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
moldy530 pushed a commit that referenced this pull request Nov 16, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
@moldy530 moldy530 mentioned this pull request Nov 17, 2023
7 tasks
@moldy530 moldy530 mentioned this pull request Dec 1, 2023
8 tasks
avasisht23 added a commit that referenced this pull request Dec 3, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
avasisht23 added a commit that referenced this pull request Dec 3, 2023
* feat: add zod runtime validation for base account

* feat: add zod runtime validation for base account

* feat: add zod runtime validation for simple account

* refactor: clean up base schemas

* refactor: rebase

* refactor: rename abitype import
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.

3 participants