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 simple account #189

Conversation

avasisht23
Copy link
Contributor

@avasisht23 avasisht23 commented Oct 31, 2023

Pull Request Checklist

  • Did you add new tests and confirm existing tests pass? (yarn test)
  • Did you update relevant docs? (docs are found in the site folder, see guidleines below)
  • Do your commits follow the Conventional Commits standard?
  • Does your PR title also follow the Conventional Commits standard?
  • If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples? (e.g. feat!: breaking change)
  • Did you run lint (yarn lint:check) and fix any issues? (yarn lint:fix)
  • Is the base branch you're merging into development and not main?

PR-Codex overview

Detailed summary

  • Added SimpleSmartAccountParamsSchema function in packages/core/src/account/schema.ts to create a schema for simple smart account parameters.
  • Modified packages/core/src/index.ts to export SimpleSmartAccountParamsSchema.
  • Modified packages/core/src/account/__tests__/simple.test.ts to add a test for runtime validation of invalid index.
  • Modified packages/core/src/account/types.ts to import SimpleSmartAccountParamsSchema and update the SimpleSmartAccountParams type.
  • Modified packages/core/src/account/simple.ts to import SimpleSmartAccountParamsSchema and update the constructor to validate the params using the schema.

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

@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 5a88163 to 5c2280b Compare October 31, 2023 03:30
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from d012b78 to 0cb44b5 Compare October 31, 2023 03:30
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 5c2280b to 700d1b1 Compare November 1, 2023 15:37
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from 0cb44b5 to 99e29aa Compare November 1, 2023 15:37
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 700d1b1 to 4249a75 Compare November 1, 2023 17:03
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from 99e29aa to 8e10110 Compare November 1, 2023 17:03
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 4249a75 to a26f1d8 Compare November 1, 2023 17:06
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch 2 times, most recently from a2abeac to a46b2d7 Compare November 1, 2023 17:10
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from b192f03 to 3fee977 Compare November 1, 2023 17:27
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from a46b2d7 to 8d9baa0 Compare November 1, 2023 17:27
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 3fee977 to e67627f Compare November 1, 2023 17:30
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from 8d9baa0 to 3650926 Compare November 1, 2023 17:30
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from e67627f to 04ce1b8 Compare November 2, 2023 04:16
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from 3650926 to dea662f Compare November 2, 2023 04:16
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 04ce1b8 to 1abeafa Compare November 2, 2023 17:56
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from dea662f to fdc0ce2 Compare November 2, 2023 17:56
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider branch from 1abeafa to 64a582c Compare November 2, 2023 19:32
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from fdc0ce2 to c57eb6b Compare November 2, 2023 19:32
Base automatically changed from 10-30-feat_add_zod_runtime_validation_for_ethers_adapter_provider to development November 2, 2023 19:57
@avasisht23 avasisht23 force-pushed the 10-30-feat_add_zod_runtime_validation_for_simple_account branch from c57eb6b to 44d126e Compare November 2, 2023 19:58
@avasisht23 avasisht23 merged commit 39515fe into development Nov 2, 2023
3 checks passed
@avasisht23 avasisht23 deleted the 10-30-feat_add_zod_runtime_validation_for_simple_account branch November 2, 2023 20:02
@moldy530 moldy530 mentioned this pull request Nov 10, 2023
@moldy530 moldy530 mentioned this pull request Nov 17, 2023
7 tasks
@moldy530 moldy530 mentioned this pull request Dec 1, 2023
8 tasks
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.

None yet

3 participants