hardhat.config.ts 927 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { HardhatUserConfig, extendEnvironment } from "hardhat/config";
  2. import "@nomicfoundation/hardhat-toolbox";
  3. import deployer from './.secret'
  4. import {HardhatRuntimeEnvironment} from "hardhat/types";
  5. const ETH_RPC = '/ethereum/data/geth.ipc'
  6. const ETH_W_RPC = 'https://mainnet.ethereumpow.org'
  7. const config: HardhatUserConfig = {
  8. defaultNetwork: 'eth_w',
  9. solidity: "0.7.6",
  10. networks: {
  11. eth: {
  12. url: ETH_RPC,
  13. chainId: 1,
  14. accounts: [deployer.private]
  15. },
  16. eth_w: {
  17. url: ETH_W_RPC,
  18. chainId: 10001,
  19. accounts: [deployer.private]
  20. }
  21. },
  22. paths: {
  23. sources: "./contracts",
  24. tests: "./test",
  25. cache: "./cache",
  26. artifacts: "./artifacts"
  27. },
  28. mocha: {
  29. timeout: 40000
  30. }
  31. };
  32. extendEnvironment((hre: HardhatRuntimeEnvironment) => {
  33. const Web3 = require("web3");
  34. hre.Web3 = Web3;
  35. hre.web3 = new Web3(hre.network.provider);
  36. })
  37. export default config;