feat: complete cancun hardhat compile setup for wtf-contract

This commit is contained in:
Bot
2026-08-31 00:12:55 +08:00
parent e1094b09d5
commit 92dc1b5e02
6 changed files with 83 additions and 14 deletions
+27 -10
View File
@@ -4,22 +4,39 @@ require("dotenv").config();
const PRIVATE_KEY = process.env.PRIVATE_KEY || "0x0000000000000000000000000000000000000000000000000000000000000001";
module.exports = {
solidity: {
version: "0.8.29",
settings: {
evmVersion: "cancun",
optimizer: {
enabled: true,
runs: 200
}
}
},
paths: {
sources: "./main/src",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
solidity: {
compilers: [
{
version: "0.8.29",
settings: {
evmVersion: "cancun",
optimizer: {
enabled: true,
runs: 200
},
viaIR: true
}
},
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
]
},
preprocess: {
// 处理 @wtf/ 别名映射
},
networks: {
localhost: {
url: "http://127.0.0.1:8545"