# Out of gas error

A common error when running a live example, or interacting with the blockchain, is the one where you get an "out of gas exception". The ones experienced with blockchain will understand what this means. For every blockchain transaction, you need to pay for its execution. The gas is paid in the native coins for the given blockchain network with which you interact with.

If you are interacting with the Polygon network, the native coin is called MATIC token, and you need to own these in order to pay for the transactions. For Ethereum blockchain network gas token is called ETH, for Avalanche this is AVAX, and so on... MATIC tokens, as any other, have their market price, and at the time of writing it's around $1.25 / MATIC which is enough to execute a bunch of transactions.

But for testing purposes, it's best to test the transactions on the test chains. For example, Polygon runs a test blockchain network called **Polygon Mumbai,** and you have to pay for the transaction execution in the Mumbai's MATIC token, but the difference here's that price of the test MATIC coin is 0.

If you're running our live examples, they are all deployed and connected to the Mumbai Test chain. So if you get an out of gas error such as the one below, it means you need to obtain test MATIC coins.

<figure><img src="/files/CqXAHbMXr2elRFgxDZ2c" alt=""><figcaption><p>Out of gas error when executing the transaction.</p></figcaption></figure>

You can see here that the error clearly states you're out of "gas", gas being the native coin with which you need to pay for the transaction. In the upper-left, the gas available is equal to zero. So again, if you're running Live Examples from the docs here, or you are trying to interact with your own contracts and examples deployed on the **Mumbai Test Chain**, you can simply copy your blockchain address (marked with an arrow in the image above) and go to the [Polygon Faucet Portal](https://faucet.polygon.technology/) to obtain some of the test gas tokens. Paste your address in the Wallet Address field on the portal and then click on the 'Submit' request. Then again confirm the faucet action and that's it, your wallet will be funded with the test tokens in 5 or 10 seconds. Now go back to the transaction execution screen and try repeating the action.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dev3.sh/welcome-to-dev3/sdk/faq/out-of-gas-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
