-
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
refactor: clean up some of the light account types #828
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
TODO: need to update the migration guide as well |
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.
This is great cleanup, thank you!
TEntryPointVersion | ||
> & { | ||
TLightAccountVersion extends LightAccountVersion<"LightAccount"> = LightAccountVersion<"LightAccount"> | ||
> = LightAccountBase<TSigner, "LightAccount", TLightAccountVersion> & { |
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.
omg this is so much better
TLightAccountVersion | ||
> = GetEntryPointForLightAccountVersion<"LightAccount", TLightAccountVersion> | ||
TLightAccountVersion extends LightAccountVersion<"LightAccount"> = LightAccountVersion<"LightAccount">, | ||
TEntryPointVersion extends LightAccountEntryPointVersion<"LightAccount"> = LightAccountEntryPointVersion<"LightAccount"> |
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.
Just curious: why does this type still need a TEntryPointVersion
parameter rather than inferring the entry point version from TLightAccountVersion
like in the other places? Likewise for CreateMultiOwnerLightAccountParams
later.
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.
I think I ran into something by not having it generic here... but can't remember what it was. lemme try and remove this all together and infer it from the version
b2dfb16
to
3b3565b
Compare
3b3565b
to
892e66b
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 updates functions and types related to light accounts in the smart contracts.
Detailed summary
getLightAccountVersionDef
togetLightAccountVersionForAccount
type
property inmultiOwnerAlchemyClient.ts
LightAccountVersion
createAccount.ts