How to Fix Gas Manager Errors
Below are errors related to Gas Manager.
Invalid Policy ID
Example error message:
{ code: -32602, message: '"Invalid Policy ID. Please ensure you're sending requests with the api key associated with the policy's app, and that the policy is active."' }
Solution
Gas manager policies can only be tied to one app and one chain. To resolve this issue:
Use BOTH the policy ID and the API key associated with the app for which the Gas Manager policy is configured
Policies can only be configured for one chain at a time
Ensure the policy is active
Policy Limit Errors
Below are errors associated with Gas Manager policy limits.
Policy's max spend per spender exceeded.
This error indicates that the total amount sponsored for this sender has reached the maximum limit set in the policy. Review your policy and adjust the max spend per address if needed.
Policy's max count per spender exceeded.
This error means that you’ve sponsored the max number of userOps for this sender, as specified in the Gas Manager policy. Review your policy and adjust the max operations per address if needed.
Policy max count exceeded.
This error means that you’ve sponsored the max number of userOps for this policy. Review your policy and adjust the max operations per policy if needed.
Policy max count exceeded.
This error means that you’ve reached the maximum dollar amount for this policy. Review your policy and adjust the max spend per policy if needed.
User operation cost exceeds specified spend limit
This error means that the gas required for this userOp exceeds the max dollar amount you are willing to sponsor per userOp, as specified in the Gas Manager policy. Adjust the max spend per UO in your policy if needed.
sender isn't in policy's allowlist
If the allowlist is not empty, only sender addresses included in the allowlist can be sponsored. Add the sender address to the allowlist if sponsorship is desired.
sender address in policy's blocklist
Any address included in the blocklist is banned from receiving sponsorship. Remove the sender address from the blocklist if sponsorship is desired.
policy hasn't started
This error means the policy is not currently active because it has not started. Check the policy's start date.
policy has ended
This error means the policy is not currently active because it has ended. Check the policy's end date.
Team Sponsorship Limit Errors
Here is an example error message:
This transaction’s USD cost will put your team over your gas sponsorship Limit. To increase your limit, please upgrade your account, buy gas credits in your Gas Manager Dashboard: <https://dashboard.alchemy.com/gas-manager>, or reach out to [[email protected]](<mailto:[email protected]>).
Here is an example of our old error message:
This transaction’s cost will put the team over their MAX token limit for this network. To increase the limit, reach out on discord or [[email protected]](<mailto:[email protected]>).
What is this?
This error means that this userOp will cause you to hit exceed your sponsorship limit. This limit is determined by your Alchemy tier (see limits here) and checks against the sum of pending and mined User Operations.
We offer free unlimited sponsorship on testnets
Your usage will reset once your gas manager bill is paid at the end of the month
Why do pending UOs count towards my limit?
Any valid paymaster signature will count towards this limit as these signatures could be used for sponsorship.
Paymaster signatures are valid for the policy expiry time defined on the policy itself.
Setting your policy expiry too long could cause the number of valid signatures to pile up. Even if those user operations are rejected at the Bundler level on send user operation, the paymaster signature will continue to be valid and count towards your limit until the signature expires on-chain. There is no way to invalidate this signature once it has been granted.
Will I get alerted when I get close to this limit?
Yes! Billing admin on your team account will be emailed when you are at 50%, 75%, 90%, and 100% of your limit.
Solutions
Upgrade your Alchemy plan - see limits here
Purchase gas credits - in your gas manager dashboard you can purchase gas credits in USD to increase your limit. Check out a demo here.
These credits will be a one time non-refundable purchase and applied to your gas manager bill at the end of the month
Your limit will be the sum of your tier limit plus any unused purchased gas credits
NOTE: Ensure you do not have any open unpaid invoices - your usage will reset once your gas manager bill is paid