-
Notifications
You must be signed in to change notification settings - Fork 147
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Your org has enabled the Graphite merge queue for merging into mainAdd 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[]; |
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.
can one chain have multiple policy ids?
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.
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.
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.
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
@alex-miao is this still relevant? |
a84b1fc
to
2702d97
Compare
2702d97
to
ba52467
Compare
ba52467
to
eed0833
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 focuses on updating the type of
policyId
across various files to allow it to accept either astring
or an array ofstring
. This change enhances flexibility in handling multiple policy IDs within the Alchemy gas manager.Detailed summary
policyId
type tostring | string[]
increateConfig.ts
.RequestGasAndPaymasterAndDataRequest
type intypes.ts
.policyId
inalchemyGasManagerMiddleware.mdx
.policyId
type insmartAccountClient.ts
.RpcConnectionConfig
to acceptpolicyId
asstring | string[]
.alchemyGasManagerMiddleware
function tostring | string[]
.AlchemyGasAndPaymasterAndDataMiddlewareParams
to reflect newpolicyId
type.