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

Add isValidAAEntrypoint and isWalletASmartWallet Onchain Kit utilities #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cpcramer
Copy link

@cpcramer cpcramer commented Jun 7, 2024

Add isValidAAEntrypoint and isWalletASmartWallet Onchain Kit utilities to the Transact With Paymaster demo.

Copy link

vercel bot commented Jun 7, 2024

@cpcramer is attempting to deploy a commit to the wilsoncusack's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Jun 7, 2024

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

Name Status Preview Comments Updated (UTC)
wagmi-scw ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2024 1:56pm

@wilsoncusack
Copy link
Owner

@cpcramer is this ready to merge?

@cpcramer cpcramer force-pushed the paul/add-isValidAAEntrypoint-and-isWalletASmartWallet branch from 1b94f4f to 7ad8967 Compare June 10, 2024 14:06
@cpcramer cpcramer changed the title 🚧 Add isValidAAEntrypoint and isWalletASmartWallet Onchain Kit utilities Add isValidAAEntrypoint and isWalletASmartWallet Onchain Kit utilities Jun 10, 2024
@cpcramer
Copy link
Author

Ready to merge

// check entrypoint
// not strictly needed given below check on implementation address, but leaving as example
if (entrypoint.toLowerCase() !== ENTRYPOINT_ADDRESS_V06.toLowerCase())
if (!isValidAAEntrypoint({ entrypoint } as IsValidAAEntrypointOptions))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpcramer in this case I want to check if it is specifically version 6

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It checks for v6 but we should probably make that more explicit!

)[0];
if (implementationAddress != coinbaseSmartWalletV1Implementation)
if (
!(await isWalletASmartWallet({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this to be isWalletACoinbaseSmartWallet just to be really clear?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that's a good call. I'll update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating here coinbase/onchainkit#562

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