Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Jan 17, 2025
1 parent d65b415 commit ef76dcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,6 @@ export const main = async (argv: any, version?: string) => {
}
});

// periodically fetch and set gas price in state (once every 20 seconds)
setInterval(() => getGasPrice(config, state), 20_000);

const lastReadOrdersMap = options.subgraph.map((v) => ({
sg: v,
skip: 0,
Expand Down
4 changes: 3 additions & 1 deletion src/processOrders.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChainId } from "sushi";
import { findOpp } from "./modes";
import { getQuoteGas } from "./gas";
import { getGasPrice, getQuoteGas } from "./gas";
import { PublicClient } from "viem";
import { Token } from "sushi/currency";
import { createViemClient } from "./config";
Expand Down Expand Up @@ -499,6 +499,8 @@ export async function processPair(args: {
ratio: ethers.utils.formatUnits(orderPairObject.takeOrders[0].quote!.ratio),
});

await getGasPrice(config, state);

// get pool details
if (
!dataFetcher.fetchedPairPools.includes(pair) ||
Expand Down

0 comments on commit ef76dcd

Please sign in to comment.