Wallet API Errors

When working with Wallet APIs, you may encounter various errors. Here are some common errors and how to troubleshoot them.

Replacement underpriced

1{
2 "code": -32602,
3 "message": "replacement underpriced",
4 ...
5}

Replacement underpriced errors occur when you attempt to send call from the same sender before a pending call has been confirmed on-chain. Please follow these recommendations.

Execution reverted

1{
2 "code": -32521,
3 "message": "execution reverted",
4 ...
5}

This error normally happens if the calls you are attempting to make are reverting on-chain. Double check that you are calling the correct method on the correct contract address, you are using the correct chain, and that the method arguments are correct and properly ABI-encoded.

ERC20: transfer amount exceeds balance

1{
2 "code": -32521,
3 "message": "ERC20: transfer amount exceeds balance",
4 ...
5}

If paying for gas with ERC20 tokens, ensure the sender has the required balance.

AA23 reverted

1{
2 "code": -32500,
3 "message": "validation reverted: [reason]: AA23 reverted",
4 ...
5}

AA23 errors happen if sender signature validation reverted or ran out of gas (OOG). Please follow these recommendations.

AA25 invalid account nonce

1{
2 "code": -32500,
3 "message": "validation reverted: [reason]: AA25 invalid account nonce",
4 ...
5}

The nonce used is invalid. This usually happens if trying to reuse an old nonce. Please follow these recommendations.

Policy ID(s) not found

1{
2 "code": -32600,
3 "message": "Sponsorship failed: [invalid_argument] Policy ID(s) not found. Please ensure you're sending requests with the API key associated with the policies' app, that the policies are active, and the network is allowed.",
4 ...
5}

Please ensure you’re sending requests with the API key associated with the policy’s app, the policy is active, and the network is allowed. See gas sponsorship docs for more info.

Invalid account signature

1{
2 "code": -32507,
3 "message": "invalid account signature",
4 ...
5}

The call was rejected because it contains an invalid signature from the sender. Be sure that you are correctly signing the signature request(s). Refer to the Wallet API quickstart for more info.

Precheck failed: sender balance

1{
2 "code": -32000,
3 "message": "precheck failed: sender balance and deposit together is ____ but must be at least ____ to pay for this operation",
4 ...
5}

The sender’s balance is too low to cover gas fees. This normally happens when you mistakenly forget to include your Gas Sponsorship Policy ID. See gas sponsorship docs for more info.