Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Gas sponsorship

Whether you're building an app, gas sponsorship allows you to create seamless user experiences by controlling how transaction fees are handled.

Gas manager overview

A gas manager is at the heart of how Openfort handles transaction fees. It serves as your control center for managing how and when your application sponsors users' gas fees.

Start by visiting the Gas Policy tab in your dashboard and clicking Add Policy. From there, configure how you want to handle transaction fees.

Sponsoring gas fees

When it comes to sponsoring gas fees, you have two main payment methods available:

Pay with credit card

Add balance credit to your account. When you choose this method, gas costs are automatically deducted from your balance as transactions occur. This is required for livemode operations.

Pay with native tokens

For more advanced use cases, you can use network native tokens (like ETH on Base). This method involves depositing tokens to Openfort's Paymaster contract. Here's how to set it up:

Check the entity addresses page to find the paymaster's address for your network.

Deposit your tokens using the depositFor function

deposit native tokens

Register your EOA wallet

Go to the backend wallets page to register your EOA wallet.

Sign and validate your signature

Click on advanced configuration (see the video below).

Configure your policy

Select "Sponsor gas with your tokens" when editing or creating a policy.

deposit native tokens

Using external paymasters

Openfort supports integration with external paymasters for custom gas sponsorship requirements. When using external paymasters, use the pay_for_user strategy.

You can set up an external paymaster either through the dashboard or via the API.

Using the dashboard

With these fundamentals in place, you're ready to start managing gas fees for your users. The next section covers the different types of policies and rules you can create.

Copyright © 2023-present Alamas Labs, Inc