# Mẹo & Thủ thuật

## Làm thế nào để lấy giá gas hiện tại

Để lấy giá gas trên Chiliz Chain, bạn có thể sử dụng một trong các node RPC công cộng.

Bạn có thể yêu cầu giá gas như sau:

```bash
curl --location 'https://rpc.ankr.com/chiliz' 
--header 'Content-Type: application/json' 
--data '{ 
    "method": "eth_gasPrice", 
    "params": [], 
    "id": 1, 
    "jsonrpc": "2.0"
}'
```

## Làm thế nào để kiểm tra lý do giao dịch thất bại

Một giao dịch có thể thất bại và bạn không phải lúc nào cũng biết lý do tại sao, đặc biệt là khi block explorer không hiển thị lỗi.

Để kiểm tra lý do tại sao giao dịch của bạn thất bại, chạy script sau trong terminal với ID giao dịch chính xác:

```bash
curl --location 'https://chiliz-rpc.publicnode.com' \
--header 'Content-Type: application/json' \
--data '{
    "method": "debug_traceTransaction",
    "params": [
        "[Transaction ID]",
        {
            "tracer": "callTracer"
        }
    ],
    "id": 1,
    "jsonrpc": "2.0"
}'
```


---

# 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.chiliz.com/vi/phat-trien/co-ban/meo-and-thu-thuat.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.
