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: add multi-policy sponsorships #1189

Merged
merged 1 commit into from
Feb 24, 2025
Merged

feat: add multi-policy sponsorships #1189

merged 1 commit into from
Feb 24, 2025

Conversation

alex-miao
Copy link
Collaborator

@alex-miao alex-miao commented Dec 4, 2024

Pull Request Checklist


PR-Codex overview

This PR focuses on updating the type of policyId across various files to allow it to accept either a string or an array of string. This change enhances flexibility in handling multiple policy IDs within the Alchemy gas manager.

Detailed summary

  • Updated policyId type to string | string[] in createConfig.ts.
  • Modified RequestGasAndPaymasterAndDataRequest type in types.ts.
  • Changed documentation for policyId in alchemyGasManagerMiddleware.mdx.
  • Updated policyId type in smartAccountClient.ts.
  • Altered RpcConnectionConfig to accept policyId as string | string[].
  • Adjusted parameter type in alchemyGasManagerMiddleware function to string | string[].
  • Updated interface AlchemyGasAndPaymasterAndDataMiddlewareParams to reflect new policyId type.

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

Copy link

vercel bot commented Dec 4, 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 Feb 24, 2025 8:57pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 8:57pm

Copy link

graphite-app bot commented Dec 4, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “graphite-merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

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

@@ -78,7 +78,7 @@ type RpcConnectionConfig =
chain: Chain;
chains: {
chain: Chain;
policyId?: string;
policyId?: string | string[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

can one chain have multiple policy ids?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, with the idea being that when we have gas grants you can add both the grant as well as your own policy. In general this model might be worth revisiting now that we also have multi-chain policices.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yea with multi-chain policies, it almost feels like we can add support for that at the top level and just have a policyId?: string[] and start pushing folks towards that

@moldy530
Copy link
Collaborator

@alex-miao is this still relevant?

@alex-miao alex-miao merged commit 024d735 into main Feb 24, 2025
7 checks passed
@alex-miao alex-miao deleted the alex/multi-policy branch February 24, 2025 22:49
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.

2 participants