feat: add hardhat config and production deployment script

This commit is contained in:
Bot
2026-08-30 23:42:56 +08:00
parent f2769993b5
commit e1094b09d5
3 changed files with 188 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
require("@nomicfoundation/hardhat-toolbox");
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"
},
networks: {
localhost: {
url: "http://127.0.0.1:8545"
},
robinhoodTestnet: {
url: process.env.ROBINHOOD_TESTNET_RPC || "https://rpc.testnet.chain.robinhood.com",
chainId: 46630,
accounts: [PRIVATE_KEY]
},
robinhoodMainnet: {
url: process.env.ROBINHOOD_MAINNET_RPC || "https://rpc.chain.robinhood.com",
chainId: 46631, // 根据 Robinhood Chain 主网 ChainId 确认
accounts: [PRIVATE_KEY]
}
}
};