hardhat.config.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 = 'https://mainnet.infura.io/v3/'
  7. const GOERLI_RPC = 'https://eth-goerli.api.onfinality.io/public'
  8. const ARBITRUM_GOERLI_RPC = 'https://endpoints.omniatech.io/v1/arbitrum/goerli/public'
  9. const config: HardhatUserConfig = {
  10. defaultNetwork: 'arbitrum_goerli',
  11. solidity: "0.7.6",
  12. networks: {
  13. eth: {
  14. url: ETH_RPC,
  15. chainId: 1,
  16. accounts: [deployer.private]
  17. },
  18. goerli: {
  19. url: GOERLI_RPC,
  20. chainId: 5,
  21. accounts: [deployer.private]
  22. },
  23. arbitrum_goerli: {
  24. url: ARBITRUM_GOERLI_RPC,
  25. chainId: 421613,
  26. accounts: [deployer.private]
  27. }
  28. },
  29. paths: {
  30. sources: "./contracts",
  31. tests: "./test",
  32. cache: "./cache",
  33. artifacts: "./artifacts"
  34. },
  35. mocha: {
  36. timeout: 40000
  37. }
  38. };
  39. extendEnvironment((hre: HardhatRuntimeEnvironment) => {
  40. const Web3 = require("web3");
  41. hre.Web3 = Web3;
  42. hre.web3 = new Web3(hre.network.provider);
  43. })
  44. export default config;