skyfffire 3 سال پیش
والد
کامیت
e044b68899
2فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 8 3
      hardhat.config.ts
  2. 1 0
      scripts/lp/lpMaintenance.ts

+ 8 - 3
hardhat.config.ts

@@ -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;

+ 1 - 0
scripts/lp/lpMaintenance.ts

@@ -131,6 +131,7 @@ export class LpMaintenance {
 
       // 将lp类型有变动的全部更新
       for (const lpDbObj of allTypeLpList) {
+        logger.debug(lpDbObj)
         await this.handleLp(lpDbObj.dataObj, lpDbObj.block)
       }
     }