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

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

Conversation

alex-miao
Copy link
Collaborator

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

Pull Request Checklist


PR-Codex overview

This PR updates the version numbers across multiple files and modifies the policyId parameter to accept both string and string[] types in several locations, enhancing flexibility in handling policy IDs.

Detailed summary

  • Updated VERSION from 4.5.1 to 4.6.0 in:
    • aa-sdk/core/src/version.ts
    • account-kit/signer/src/version.ts
    • account-kit/logging/src/version.ts
  • Changed policyId type from string to string | string[] in:
    • account-kit/infra/src/client/smartAccountClient.ts
    • account-kit/infra/src/middleware/gasManager.ts
    • account-kit/core/src/types.ts
    • account-kit/infra/src/middleware/gasManager.ts documentation

✨ 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 Dec 4, 2024 8:52pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 8:52pm

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

@@ -56,15 +56,15 @@ export type AlchemyAccountsConfig = {
export type Connection = {
transport: AlchemyTransportConfig;
chain: Chain;
policyId?: string;
policyId?: string | string[];
};

type RpcConnectionConfig =
Copy link
Collaborator

Choose a reason for hiding this comment

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

almost feels like we need one more permutation here like the following that allows you to specify the policyId array at the top level instead of nesting it

{
  chain: Chain;
  chains: {
    chain: Chain;
    transport?: AlchemyTransport
  }[],
  transport: AlchemyTransport;
  signerConnection?: ConnectionConfig;
  policyId?: string[];
}
| {
  chain: Chain;
  chains: {
    chain: Chain;
    transport?: AlchemyTransport
  }[],
  transport?: never;
  signerConnection: ConnectionConfig;
  policyId?: string[];
}

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