| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import { HardhatUserConfig, extendEnvironment } from "hardhat/config";
- import "@nomicfoundation/hardhat-toolbox";
- import deployer from './.secret'
- import logger from "./utils/logger";
- import {HardhatRuntimeEnvironment} from "hardhat/types";
- import Web3 from "web3";
- import net from "net";
- const ETH_RPC = 'http://3.227.34.41:8545'
- const ETH_W_RPC = 'http://3.227.34.41:18545'
- const ETH_W_WS = 'ws://3.227.34.41:18546'
- const ETH_W_IPC = '/ethereum_pow_800/data/geth.ipc'
- const config: HardhatUserConfig = {
- defaultNetwork: 'eth_w',
- solidity: "0.7.6",
- networks: {
- eth: {
- url: ETH_RPC,
- chainId: 1,
- accounts: [deployer.private]
- },
- eth_w: {
- url: ETH_W_RPC,
- chainId: 10001,
- accounts: [deployer.private]
- }
- },
- paths: {
- sources: "./contracts",
- tests: "./test",
- cache: "./cache",
- artifacts: "./artifacts"
- },
- mocha: {
- timeout: 40000
- }
- };
- extendEnvironment((hre: HardhatRuntimeEnvironment) => {
- const Web3 = require('web3');
- hre.Web3 = Web3;
- // const net = require('net');
- // logger.debug(`use ${ETH_W_IPC}`)
- // hre.web3 = new Web3(ETH_W_IPC, net);
- const net = require('net');
- logger.debug(`use ${ETH_W_WS}`)
- hre.web3 = new Web3(ETH_W_WS);
- })
- export default config;
|