hardhat.config.ts 972 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_RPC = 'http://3.227.34.41:8545'
  7. const ETH_W_RPC = 'https://mainnet.ethereumpow.org'
  8. const config: HardhatUserConfig = {
  9. defaultNetwork: 'eth_w',
  10. solidity: "0.7.6",
  11. networks: {
  12. eth: {
  13. url: ETH_RPC,
  14. chainId: 1,
  15. accounts: [deployer.private]
  16. },
  17. eth_w: {
  18. url: ETH_W_RPC,
  19. chainId: 10001,
  20. accounts: [deployer.private]
  21. }
  22. },
  23. paths: {
  24. sources: "./contracts",
  25. tests: "./test",
  26. cache: "./cache",
  27. artifacts: "./artifacts"
  28. },
  29. mocha: {
  30. timeout: 40000
  31. }
  32. };
  33. extendEnvironment((hre: HardhatRuntimeEnvironment) => {
  34. const Web3 = require("web3");
  35. hre.Web3 = Web3;
  36. hre.web3 = new Web3(hre.network.provider);
  37. })
  38. export default config;