-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
38 lines (33 loc) · 1.01 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { task, type HardhatUserConfig } from "hardhat/config"
import "@nomicfoundation/hardhat-toolbox-viem"
import { SupportedChains } from "./data/types"
import calculateProfit from "./scripts/main"
task("chains", "Prints the list of supported chains").setAction(async () => {
const supportedChains: string[] = Object.keys(SupportedChains).filter((key) =>
isNaN(Number(key)),
)
console.log(supportedChains)
})
task("calc", "Calculate profit")
.addParam("account", "Account address")
.addParam(
"chain",
"Chain (print list of supported chains by running npx hardhat chains",
)
.addParam(
"ignore",
"Ignore transactions with profit above this number in USD (recommended: 1000)",
)
.addParam("days", "Number of days to look back")
.setAction(async (taskArgs) => {
await calculateProfit(
taskArgs.account,
taskArgs.chain,
Number(taskArgs.ignore),
Number(taskArgs.days),
)
})
const config: HardhatUserConfig = {
solidity: "0.8.24",
}
export default config