Keplr wallet is a popular cryptocurrency wallet for IBC networks. IBC, or Inter-Blockchain Communication Protocol, is a protocol to handle communication between two blockchains. The base of this system is made up of the Cosmos and Osmosis networks.
IBC sounds are really complex, and it is quite extensive. But that’s not what we are here today.
You’re here because you probably encountered the out of gas in location error on your Keplr wallet. The Tx failed notification will usually come with a similar notification to this:
“Tx failed out of gas in location: WritePerByte; gasWanted: …, gasUsed: … out of gas”
What’s the “Out of Gas in Location” Error on Keplr?
The out of gas error means that the amount of gas allowed or set is lower than the gas needed for the transaction. And because of that, the transaction couldn’t be processed.
So two factors come into play: gasWanted and gasUsed. GasWanted is the limit for the transaction, and gasUsed is the amount of gas required for the transaction – that couldn’t be used because the limit is lower.
But why does this happen when Keplr automatically set the needed gas fee for every transaction?
The algorithm can’t see in the future. It is making gas estimations based on previous transactions in the set timeframe. But at any given moment, there can be a quick surge of transactions that higher the needed gas fee. But the automation didn’t have enough time to regulate your fee, maybe because you were already confirming the transaction in your wallet.
So how do you fix it?
How to Fix the “Out of Gas in Location” Error on Keplr
There’s no other fix to this error than to increase the gas limit so that it’s greater than the gasWanted (needed for the transaction).
When you are entering a transaction in the Keplr wallet, you can select how high the fee you want to pay should be from three options: high, medium, or low.
That’s the automated estimation based on the current market activity.
- You can choose from different options based on how fast you need your transaction to be completed. It’s not that big of an issue on networks like Cosmos, which can process up to 10,000 transactions per second.
But you also have the option to manually edit the gas limit. Under the three buttons, you can find another one, a lot smaller, that says “Set Gas.” Tap that.
Now edit the gas limit to be a bit higher than the previous gasUsed value you got in the out of gas in location error.
For instance, in our case, the gas needed was 141095, so we would set it to 145000. There are a lot of digits in those numbers; make sure not to miscount the zeros.
Once the gas limit is set higher, your transaction should successfully go through.
If you took some time to find this guide and read it through, try to make the transaction again with the preset limits – it may go through successfully now, and you’ll save a bit.
If you received the “out of gas in location” error, it means that the gas limit set is lower than the gas needed for the transaction to proceed. That’s probably just because the Keplr wallet missed the mark with the gas estimation.
Just higher the gas limit to be a bit higher than the gasUsed value from the error notification.