Skip to content

feat: attach a Pimlico sponsorship policy to every userop - #2581

Merged
MayankMittal1 merged 1 commit into
masterfrom
mayank/feat/pimlico-sponsorship-policy
Sep 24, 2026
Merged

MayankMittal1 merged 1 commit into
masterfrom
mayank/feat/pimlico-sponsorship-policy

Conversation

@MayankMittal1

@MayankMittal1 MayankMittal1 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds EXPO_PUBLIC_PIMLICO_SPONSORSHIP_POLICY_ID to lib/config.ts.
  • useUser passes it as paymasterContext: { sponsorshipPolicyId } to createSmartAccountClient. Every userop goes through this one client, so the policy is sent in every pm_sponsorUserOperation call.
  • If the variable is empty, no policy is sent and sponsorship works as it does now.
  • Documents the variable in .env.example and the README.

Deploy note

Set EXPO_PUBLIC_PIMLICO_SPONSORSHIP_POLICY_ID=sp_romantic_fallen_one wherever the build env vars live (EAS / web host). It is not set anywhere in the repo, and a build without it silently sends no policy.

Test plan

  • tsc --noEmit: no new errors (9 before and after, none in the changed files)
  • eslint and prettier pass on the changed files
  • With the variable set, send a userop and check that it shows up under the policy in the Pimlico dashboard

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Reads the policy ID from EXPO_PUBLIC_PIMLICO_SPONSORSHIP_POLICY_ID and
passes it as paymasterContext on the smart account client, so Pimlico
applies it in pm_sponsorUserOperation. Unset means no policy is sent.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Preview Sep 24, 2026 5:43pm UTC
solid-app-staging Ignored Ignored Sep 24, 2026 5:43pm UTC

Request Review

@MayankMittal1
MayankMittal1 merged commit 4c5f93b into master Sep 24, 2026
6 of 7 checks passed
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.

1 participant