Skip to content

Commit

Permalink
Merge branch 'develop' into v2-whitelist-and-estimaterpc
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSulpiride committed Jan 19, 2025
2 parents 0b81e98 + 6774e64 commit f2a1d52
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export class Server {
}

app.addHook("preHandler", (req, reply, done) => {
if (req.method === "POST") {

if (req.url === "/version" || req.url === "/healthcheck") {
// do nothing
} else if (req.method === "POST") {
req.log.info(
{
method: req.method,
Expand Down
2 changes: 2 additions & 0 deletions packages/params/src/gas-price-oracles/oracles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getBaseGasFee } from "./base";
import { getAncient8GasFee } from "./ancient8";
import { getAmoyGasFee } from "./amoy";
import { getEthGasPrice } from "./eth_gasPrice";
import { getScrollGasFee } from "./scroll";

export const oracles: {
[chainId: number]: IOracle | IOracle[] | undefined;
Expand All @@ -26,4 +27,5 @@ export const oracles: {
59144: getEthGasPrice,
5003: getMantleGasFee,
80002: getAmoyGasFee,
534352: getScrollGasFee,
};
7 changes: 7 additions & 0 deletions packages/params/src/gas-price-oracles/oracles/scroll.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { IGetGasFeeResult, IOracle } from "./interfaces";
import { getEtherscanGasFee } from "./utils";

export const getScrollGasFee: IOracle = (
apiKey: string | undefined
): Promise<IGetGasFeeResult> =>
getEtherscanGasFee("https://api.scrollscan.com/api", apiKey);

0 comments on commit f2a1d52

Please sign in to comment.