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: adds install validation types #1216

Closed
wants to merge 13 commits into from

Conversation

linnall
Copy link
Collaborator

@linnall linnall commented Dec 13, 2024

Pull Request Checklist


PR-Codex overview

This PR introduces two new error classes, InvalidEntityIdError and InvalidNonceKeyError, and updates various modules and types related to entity validation and configuration in the smart contract SDK. It also adds new functionality to the existing modules.

Detailed summary

  • Added InvalidEntityIdError and InvalidNonceKeyError classes in client.ts.
  • Introduced new instance options in instances.ts.
  • Updated documentation for InvalidEntityIdError and InvalidNonceKeyError.
  • Enhanced type definitions in types.ts for validation configurations.
  • Added new ABI functions and events in various modules (e.g., paymasterGuardModule, timeRangeModule, allowlistModule).

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

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2024 6:52pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2024 6:52pm

Copy link
Collaborator Author

linnall commented Dec 13, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

quick nit on semantic titles: chore is typically reserved for things like updating build scripts, CI, linting rules, that sort of thing. a chore won't result in a version bump

Defs of the semantic naming:
feat: (new feature for the user, not a new feature for build script) (minor bump)
fix: (bug fix for the user, not a fix to a build script) (patch bump)
docs: (changes to the documentation) (no bump)
style: (formatting, missing semi colons, etc; no production code change) (no bump)
refactor: (refactoring production code, eg. renaming a variable) (version bump depends on repo, most likely no bump)
test: (adding missing tests, refactoring tests; no production code change) (no version bump)
chore: (updating grunt tasks etc; no production code change) (no version bump)

if something is a breaking change, then you would have feat!: or refactor!: both of these would result in major version bumps

@howydev
Copy link
Collaborator

howydev commented Dec 14, 2024

Just in case you didn't notice - I suspect the RI implementation we've been referencing might be outdated in some of the formats. It appears that ValidationConfig is a bytes25 type, but the impl we're referencing seems to be building a bytes26 type

@linnall linnall changed the title chore: adds install validation types feat: adds install validation types Dec 15, 2024
howydev and others added 12 commits December 15, 2024 13:28
- [x] Did you add new tests and confirm existing tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md))
- [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) 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:write`)
- [ ] Did you follow the [contribution guidelines](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)?

<!-- start pr-codex -->

---

This PR focuses on renaming and restructuring several ABI files and exports in the smart contracts directory, enhancing clarity and consistency in the codebase.

- Renamed `MAV2FactoryAbi` to `accountFactoryAbi` in `accountFactoryAbi.ts`.
- Renamed `smaV2Abi` to `semiModularAccountBytecodeAbi` in `semiModularAccountBytecodeAbi.ts`.
- Renamed `singleSignerValidationAbi` to `singleSignerValidationModuleAbi` in `singleSignerValidationModule.ts`.
- Updated import statements to reflect the new names.
- Added a new `addresses` export containing various module addresses in `utils.ts`.
- Introduced new ABI definitions for `paymasterGuardModule`, `timeRangeModule`, `webauthnValidationModule`, `nativeTokenLimitModule`, and `allowlistModule`.
- Added ABI definitions for events and error types in the newly created ABI files.

> The following files were skipped due to too many changes: `account-kit/smart-contracts/src/ma-v2/abis/semiModularAccountStorageAbi.ts`

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

<!-- end pr-codex -->
uses a placeholder signer for now

<!-- start pr-codex -->

---

This PR introduces a new smart contract account type called `SMAV2Account`, along with its creation function `createSMAV2Account`. It includes types, parameters, and logic for initializing accounts using a bundler client, handling initial owners, and generating account addresses.

- Added type `SMAV2Account` for smart contract accounts.
- Introduced type `CreateSMAV2AccountParams` for account creation parameters.
- Implemented `createSMAV2Account` function to create a new account.
- Added logic to handle account initialization and owner address retrieval.
- Utilized `createBundlerClient` for client creation.
- Integrated `standardExecutor` and `multiOwnerMessageSigner` for account functionality.

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

<!-- end pr-codex -->
@linnall
Copy link
Collaborator Author

linnall commented Jan 2, 2025

closing because these changes are being merged into main via #1220

@linnall linnall closed this Jan 2, 2025
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