-
Notifications
You must be signed in to change notification settings - Fork 133
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
Linna/mav2 client #1218
Linna/mav2 client #1218
Conversation
# Pull Request Checklist - [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 --> --- ## PR-Codex overview This PR focuses on renaming and restructuring several ABI files and exports in the smart contracts directory, enhancing clarity and consistency in the codebase. ### Detailed summary - 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 --> --- ## PR-Codex overview 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. ### Detailed summary - 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 -->
- [ ] 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 introduces a new module for single signer validation in the `account-kit` smart contracts. It adds functionality for packing signatures and validating user operations, along with defining the ABI for the single signer validation module and related contracts. - Added `PackSignatureParams` type and `packSignature` utility in `utils.ts`. - Created `SingleSignerValidationModule` with metadata and encoding functions in `single-signer-validation/module.ts`. - Implemented `singleSignerMessageSigner` function in `single-signer-validation/signer.ts` for signing operations. - Defined the ABI for `singleSignerValidation` in `abis/singleSignerValidation.ts`. - Added ABI for `MAV2Factory` and `smaV2` in their respective files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- [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 various ABI exports and imports in the `account-kit/smart-contracts` project, enhancing clarity and organization 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 statement in `module.ts` for `singleSignerValidationModuleAbi`. - Added new `addresses` export with various module addresses in `utils.ts`. - Introduced `paymasterGuardModuleAbi` in `paymasterGuardModule.ts`. - Added `timeRangeModuleAbi` in `timeRangeModule.ts`. - Added `webauthnValidationModuleAbi` in `webauthnValidation.ts`. - Added `nativeTokenLimitModuleAbi` in `nativeTokenLimitModule.ts`. - Added `allowlistModuleAbi` in `allowlistModule.ts`. - Introduced `modularAccountAbi` in `modularAccountAbi.ts`. - Introduced `semiModularAccountStorageAbi` in `semiModularAccountStorageAbi.ts`. > 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 -->
# Pull Request Checklist - [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 --> --- ## PR-Codex overview This PR introduces several new smart contract ABIs and address constants for a modular account system, enhancing functionality for various modules, including validation and execution. ### Detailed summary - Added `addresses` constant with various module addresses in `addresses.ts`. - Introduced ABIs for `paymasterGuardModule`, `timeRangeModule`, `webauthnValidation`, `nativeTokenLimitModule`, `allowlistModule`, and `maV2`. - Each ABI includes functions, events, and errors relevant to their respective modules. > The following files were skipped due to too many changes: `account-kit/smart-contracts/src/ma-v2/abis/smaStorage.ts` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd 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. |
@@ -0,0 +1,130 @@ | |||
import { | |||
custom, | |||
keccak256, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'keccak256' is defined but never used.
keccak256, | ||
parseEther, | ||
publicActions, | ||
toHex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'toHex' is defined but never used.
parseEther, | ||
publicActions, | ||
toHex, | ||
type Address, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Address' is defined but never used.
toHex, | ||
type Address, | ||
} from "viem"; | ||
import { privateKeyToAccount } from "viem/accounts"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'privateKeyToAccount' is defined but never used.
|
||
const target = "0x000000000000000000000000000000000000dEaD"; | ||
|
||
const startBalance = await client.getBalance({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'startBalance' is assigned a value but never used.
address: target, | ||
}); | ||
|
||
const result2 = provider.sendUserOperation({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'result2' is assigned a value but never used.
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR focuses on renaming and restructuring various ABI exports and modules in the
account-kit
smart contracts to enhance clarity and organization. It also introduces new address constants and updates related imports and references throughout the codebase.Detailed summary
MAV2FactoryAbi
toaccountFactoryAbi
.smaV2Abi
tosemiModularAccountBytecodeAbi
.singleSignerValidationAbi
tosingleSignerValidationModuleAbi
.addresses.ts
.tempChainId
inaddresses.ts
.paymasterGuardModule
,timeRangeModule
, andwebauthnValidationModule
.createSMAV2AccountClient
function to use new types and parameters.createSMAV2Account
.