Allow the L1 gas price to be fetched from either the sequencer or a L1 provider based on the config `--l1-gas-price-backend` as well as overriding the config by using a query param. Valid values are `l1` or `l2` and it defaults to `l1`
@@ -62,6 +62,8 @@ Here's the list of environment variables you can change:
...
@@ -62,6 +62,8 @@ Here's the list of environment variables you can change:
| DATA_TRANSPORT_LAYER__LEGACY_SEQUENCER_COMPATIBILITY | false | Whether or not to enable "legacy" sequencer sync (without the custom `eth_getBlockRange` endpoint) |
| DATA_TRANSPORT_LAYER__LEGACY_SEQUENCER_COMPATIBILITY | false | Whether or not to enable "legacy" sequencer sync (without the custom `eth_getBlockRange` endpoint) |
| DATA_TRANSPORT_LAYER__NODE_ENV | development | Environment the service is running in: production, development, or test. |
| DATA_TRANSPORT_LAYER__NODE_ENV | development | Environment the service is running in: production, development, or test. |
| DATA_TRANSPORT_LAYER__ETH_NETWORK_NAME | - | L1 Ethereum network the service is deployed to: mainnet, kovan, goerli. |
| DATA_TRANSPORT_LAYER__ETH_NETWORK_NAME | - | L1 Ethereum network the service is deployed to: mainnet, kovan, goerli. |
| DATA_TRANSPORT_LAYER__L1_GAS_PRICE_BACKEND | l1 | Where to pull the l1 gas price from (l1 or l2) |
| DATA_TRANSPORT_LAYER__DEFAULT_BACKEND | l1 | Where to sync transactions from (l1 or l2) |
To enable proper error tracking via Sentry on deployed instances, make sure `NODE_ENV` and `ETH_NETWORK_NAME` are set in addition to [`SENTRY_DSN`](https://docs.sentry.io/platforms/node/).
To enable proper error tracking via Sentry on deployed instances, make sure `NODE_ENV` and `ETH_NETWORK_NAME` are set in addition to [`SENTRY_DSN`](https://docs.sentry.io/platforms/node/).
...
@@ -86,6 +88,24 @@ GET /eth/context/latest
...
@@ -86,6 +88,24 @@ GET /eth/context/latest
}
}
```
```
### Latest Ethereum L1 Gas Price
#### Request
```
GET /eth/gasprice
```
Defaults to pulling L1 gas price from config option `DATA_TRANSPORT_LAYER__L1_GAS_PRICE_BACKEND`. Can be overridden with query parameter `backend` (`/eth/gasprice?backend=l1`).
#### Response
```ts
{
"gasPrice":string
}
```
### Enqueue by Index
### Enqueue by Index
#### Request
#### Request
...
@@ -145,7 +165,7 @@ GET /transaction/index/{index: number}
...
@@ -145,7 +165,7 @@ GET /transaction/index/{index: number}
}|null,
}|null,
"queueIndex":number|null,
"queueIndex":number|null,
},
},
"batch":{
"batch":{
"index":number,
"index":number,
"blockNumber":number,
"blockNumber":number,
...
@@ -181,7 +201,7 @@ GET /batch/transaction/index/{index: number}
...
@@ -181,7 +201,7 @@ GET /batch/transaction/index/{index: number}
"prevTotalElements":number,
"prevTotalElements":number,
"extraData":string
"extraData":string
},
},
"transactions":[
"transactions":[
{
{
"index":number,
"index":number,
...
@@ -266,7 +286,7 @@ GET /batch/stateroot/index/{index: number}
...
@@ -266,7 +286,7 @@ GET /batch/stateroot/index/{index: number}