Note: If you need an increase in your sponsorship limit, please reach out on Discord!
Testnet vs. Mainnet
If you prefer not to spend real funds, you can switch to Base Goerli (testnet). The steps below are conceptually the same. Just select Base Goerli in the Coinbase Developer Platform instead of Base Mainnet, and use a contract deployed on Base testnet for your allowlisted methods.
0x83bd615eb93eE1336acA53e185b03B54fF4A17e8
, and add the function mintTo(address)
.Use your own contract
We use a simple NFT contract on Base mainnet as an example. Feel free to substitute your own.
max USD
to $0.05
max UserOperation
to 1
Limit CyclesNext, Set the Global Limit. For example, set this to
These reset based on the selected cadence (daily, weekly, monthly).
$0.07
so that once the entire paymaster has sponsored $0.07 worth of gas (across all users), no more sponsorship occurs unless you raise the limit.
.env
file..env
file in sponsored_transactions
:
Security
Never commit.env
files to a public repo!
index.js
(Using Twoslash)index.js
.Note:
- Run this via
node index.js
from your project root.- If your Paymaster settings are strict (e.g., limit 1 transaction per user), the second time you run the script, you may get a “request denied” error, indicating the policy is working.
balanceOf
function:
mintTo
) for sponsorship.permissionless
, viem
, and Foundry-generated private keys.Next Steps
- Use a proxy service for better endpoint security.
- Deploy your own contracts and allowlist them.
- Experiment with bundling multiple calls into a single sponsored transaction.