Infrastructure
For the complete documentation index, see llms.txt. This page is also available as markdown.

Gas Policies

You can configure gas policies for ZeroDev paymaster to have fine-grained control over what you sponsor, and how much.

Paymaster policies can be configured through either the dashboard or the API.

Policy Types

There are four types of gas policies on ZeroDev:

Project policies

Policies that apply to the entire project.

Contract policies

Policies that apply to specific contracts.

Wallet policies

Policies that apply to specific wallet addresses.

Custom policies

If none of the policies above meet your needs, you can program totally custom policies via a webhook.

Rate Limit Types

When you create a new policy, you set up one or more rate limits.

There are four types of rate limits:

Amount

Limit by the amount of gas.

Request

Limit by the number of requests.

Gas Price

Limit by the current gas price.

Amount per txn

Limit by the amount of gas per transaction.

Policy examples

The policies and rate limits are hopefully intuitive, but here are some common examples in case they are helpful. We will be using Polygon (MATIC) in these examples.

Here we create a project policy:

Here we create a contract policy:

Here we create a contract policy:

Here we create a wallet policy:

On this page