ethGasPrice

suspend fun ethGasPrice(chainId: String): Any

Retrieves the current gas price for the specified Ethereum-compatible chain.

This function makes a JSON-RPC request to the blockchain node to obtain the current gas price, which is typically used to estimate the cost of transactions.

Return

An object representing the gas price.

Parameters

chainId

The ID of the target Ethereum-compatible chain. This is used to route the request to the appropriate node.

See also

Throws

if there's an error during the request, such as network issues or node unavailability.