hardhat.config.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import type { HardhatUserConfig } from "hardhat/config";
  2. import hardhatToolboxMochaEthersPlugin from "@nomicfoundation/hardhat-toolbox-mocha-ethers";
  3. import { configVariable } from "hardhat/config";
  4. const config: HardhatUserConfig = {
  5. plugins: [hardhatToolboxMochaEthersPlugin],
  6. solidity: {
  7. profiles: {
  8. default: {
  9. version: "0.8.28",
  10. },
  11. production: {
  12. version: "0.8.28",
  13. settings: {
  14. optimizer: {
  15. enabled: true,
  16. runs: 200,
  17. },
  18. },
  19. },
  20. },
  21. },
  22. networks: {
  23. hardhatMainnet: {
  24. type: "edr-simulated",
  25. chainType: "l1",
  26. },
  27. hardhatOp: {
  28. type: "edr-simulated",
  29. chainType: "op",
  30. },
  31. sepolia: {
  32. type: "http",
  33. chainType: "l1",
  34. url: configVariable("SEPOLIA_RPC_URL"),
  35. accounts: [configVariable("SEPOLIA_PRIVATE_KEY")],
  36. },
  37. polygon: {
  38. type: "http",
  39. chainType: "l1",
  40. url: configVariable("POLYGON_RPC_URL"),
  41. accounts: [configVariable("POLYGON_PRIVATE_KEY")],
  42. },
  43. amoy: {
  44. type: "http",
  45. chainType: "l1",
  46. url: configVariable("AMOY_RPC_URL"),
  47. accounts: [configVariable("AMOY_PRIVATE_KEY")],
  48. },
  49. },
  50. };
  51. export default config;