This repository contains an ERC-7677 proxy template built with Hono that can be spun up by dapps wishing to sponsor user operations originating from smart account users
- Supports Multiple EntryPoints (v0.6 and v0.7)
- Supporting Multiple Chains at once
- Configure Pimlico sponsorship policies
Go to the Pimlico dashboard and create an API key
Use one of the templates below to deploy an instance of the proxy server, pasting in the previously created Pimlico API key.
On the serverless provider of your choice, create a public URL that will point to your paymaster proxy instance. Use this URL as the paymasterService
in your dapp.
1. Copy the .env template and edit it, filling in with your paymaster service provider, chain id whitelist, and more.
cp .env.template .env
npm install
npm run dev
Consider using Hono helpers such as Bearer Auth, CORS, JWT, Clerk Auth, Next Auth, or any other custom middleware for this. Add this logic to the src/index.ts
file.
Your endpoint will now be available at http://localhost:3000/api/paymaster
It is recommended to deploy the endpoint to a hosting provider like Vercel and assign it a custom domain.