-
Notifications
You must be signed in to change notification settings - Fork 139
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 alchemy transport update for the mav2 account client #1271
feat: add alchemy transport update for the mav2 account client #1271
Conversation
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
d05051e
to
b677351
Compare
0bbe272
to
05a7dca
Compare
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.
couple nits and just some questions for my own understanding but overall LGTM
We should probs also test the types at a minimum that with AlchemyTransport we get an Alchemy client and any other transport we get a non Alchemy Client
@@ -64,7 +97,21 @@ export function createSMAV2AccountClient< | |||
*/ | |||
export async function createSMAV2AccountClient( | |||
config: CreateSMAV2AccountClientParams | |||
): Promise<SmartAccountClient> { | |||
): Promise<SmartAccountClient | AlchemySmartAccountClient> { |
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.
for my own understanding: does it complain if this is just SmartAccountClient
? technically the AlchemySmartAccountClient is a SmartAccountClient
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.
No, just was being redundant. Good catch
b677351
to
d05051e
Compare
05a7dca
to
acc1708
Compare
d05051e
to
bfde6c0
Compare
acc1708
to
b826ba0
Compare
bfde6c0
to
136cc8f
Compare
b826ba0
to
73e0725
Compare
136cc8f
to
5d46490
Compare
73e0725
to
60ebd5f
Compare
5d46490
to
18a9228
Compare
429ecb6
to
c198db3
Compare
TSigner extends SmartAccountSigner = SmartAccountSigner | ||
>( | ||
args: CreateSMAV2AccountClientParams<TTransport, TChain, TSigner> & | ||
NotType<TTransport, AlchemyTransport> |
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.
Omit< | ||
AlchemySmartAccountClientConfig<TChain, LightAccount<TSigner>>, | ||
"account" | ||
> & { paymasterAndData?: never }; |
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.
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.
oh nice, I think we also need to add dummyPaymasterAndData?: never
here as well
f6eb7cb
to
272e944
Compare
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.
had one comment, but LGTM otherwise!
Omit< | ||
AlchemySmartAccountClientConfig<TChain, LightAccount<TSigner>>, | ||
"account" | ||
> & { paymasterAndData?: never }; |
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.
oh nice, I think we also need to add dummyPaymasterAndData?: never
here as well
272e944
to
6e94f2c
Compare
Merge activity
|
# Pull Request Checklist - [x] Did you add new tests and confirm existing tests pass? (`yarn test`) - [x] 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)) - [x] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [x] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard? - [x] 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`) - [x] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:write`) - [x] 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 a new type `NotType` to prevent certain type extensions and modifies various client creation functions to utilize this type. It also enhances test coverage for the `createSMAV2AccountClient` function to validate transport behavior and policy ID specifications. ### Detailed summary - Added `NotType` type to prevent type extensions. - Updated `createLightAccountClient`, `createMultiOwnerLightAccountClient`, `createMultiOwnerModularAccountClient`, and `createMultisigModularAccountClient` to use `NotType`. - Enhanced tests for `createSMAV2AccountClient` to check behavior with `AlchemyTransport`. - Added tests for policy ID and paymaster restrictions in `createSMAV2AccountClient`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
6e94f2c
to
71089c4
Compare
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 introduces a new type
NotType
for type safety in TypeScript and modifies various client functions to ensure that specific transport types are not used with certain clients. It also adds tests for thecreateSMAV2AccountClient
function, ensuring proper behavior with Alchemy transport.Detailed summary
NotType
type to enforce type constraints.createLightAccountClient
,createMultiOwnerLightAccountClient
,createMultiOwnerModularAccountClient
, andcreateMultisigModularAccountClient
to useNotType
.createSMAV2AccountClient
to validate Alchemy transport behavior.createSMAV2AccountClient
to differentiate between Alchemy and custom transports.