This adapter calculates the gas price by querying on-chain data. The response will contain an array that represents the median gas prices of the latest blocks sorted from the latest to oldest.
Required? | Name | Description | Options | Defaults to |
---|---|---|---|---|
✅ | ETHEREUM_WS_RPC_URL | The WebSocket RPC URL for the chain's node | ||
✅ | ETHEREUM_RPC_URL | The HTTP RPC URL for the chain's node |
N/A
Required? | Name | Description | Options | Defaults to |
---|---|---|---|---|
numBlocks |
The number of blocks to use to determine the gas price. | 1 | ||
blockIdx |
The index of the block used for the result field in the response | 0 |
{
"id": "1",
"data": {
"numBlocks": 1
}
}
{
"jobRunID": "1",
"result": 101768070829,
"maxAge": 30000,
"debug": {
"cacheHit": true,
"staleness": 0.836,
"performance": 0.001656449,
"providerCost": 0
},
"statusCode": 200,
"data": {
"values": [101768070829],
"result": 101768070829
}
}
{
"id": "1",
"data": {
"numBlocks": 2,
"blockIdx": 1
}
}
{
"jobRunID": "1",
"result": 101698073721,
"maxAge": 30000,
"debug": {
"cacheHit": true,
"staleness": 0.836,
"performance": 0.001656449,
"providerCost": 0
},
"statusCode": 200,
"data": {
"result": 101698073721,
"values": [101768070829, 101698073721]
}
}