-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhardhat.config.ts
97 lines (86 loc) · 2.44 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import { HardhatUserConfig, task } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomicfoundation/hardhat-ignition-ethers";
import "solidity-coverage";
import dotenv from "dotenv";
dotenv.config();
task("list-positions", "List the positions for a given owner")
.addParam("owner", "The address of the owner")
.setAction(async taskArgs => {
const { main } = require("./scripts/listPositions.ts");
await main(taskArgs.owner);
});
task("simple-swap", "Executes a swap from WETH to WEWE")
.addParam("owner", "The address of the owner")
.addOptionalParam("asset", "The address of the additional", "0x6b9bb36519538e0C073894E964E90172E1c0B41F")
.setAction(async taskArgs => {
const { main } = require("./scripts/getAssetFromEth.ts");
await main(taskArgs.owner, taskArgs.asset);
});
task("mint-nft-position", "Mints a new NFT position on Uniswap")
.addParam("owner", "The address of the owner")
.addOptionalParam("asset", "The address of the additional", "0x6b9bb36519538e0C073894E964E90172E1c0B41F")
.setAction(async taskArgs => {
const { main } = require("./scripts/mintNftPosition.ts");
await main(taskArgs.owner, taskArgs.asset);
});
task("transfer-nft", "Transfers an NFT from one owner to another")
.addParam("owner", "The address of the current owner")
.addParam("newowner", "The address of the new owner")
.addParam("tokenid", "The ID of the NFT to transfer")
.setAction(async taskArgs => {
const { owner, newowner, tokenid } = taskArgs;
const { main } = require("./scripts/stoleNftPositionFromAddress.ts");
await main(owner, newowner, tokenid);
});
const PK = process.env.PK;
const config: HardhatUserConfig = {
solidity: {
version: "0.8.19",
settings: {
optimizer: {
enabled: true,
runs: 100,
},
viaIR: true,
},
},
etherscan: {
apiKey: {
base: process.env.BASESCAN_API_KEY || "",
},
customChains: [
{
network: "base",
chainId: 8453,
urls: {
apiURL: "https://api.basescan.org/api",
browserURL: "https://basescan.org",
},
},
],
},
networks: {
base: {
accounts: PK ? [PK] : [],
chainId: 8453,
url: "https://mainnet.base.org",
},
hardhat: {
forking: {
url: process.env.FORKING_URL as string,
// blockNumber: 21568138,
enabled: true,
},
chains: {
8453: {
hardforkHistory: {
london: 0,
},
},
},
blockGasLimit: 2100000, // 6000000000, // Network block gasLimit
},
},
};
export default config;