|
|
@@ -4,6 +4,8 @@ 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'
|
|
|
@@ -38,11 +40,14 @@ const config: HardhatUserConfig = {
|
|
|
|
|
|
extendEnvironment((hre: HardhatRuntimeEnvironment) => {
|
|
|
const Web3 = require('web3');
|
|
|
- const net = require('net');
|
|
|
hre.Web3 = Web3;
|
|
|
|
|
|
- logger.debug(`use ${ETH_W_IPC}`)
|
|
|
- hre.web3 = new Web3(ETH_W_IPC, net);
|
|
|
+ // 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;
|