|
|
@@ -4,6 +4,7 @@ import contracts from "../../config/contracts";
|
|
|
import logger from "../../utils/logger";
|
|
|
import {BigNumber} from "ethers";
|
|
|
import {replaceAll} from "hardhat/internal/util/strings";
|
|
|
+import Time from "../../utils/time";
|
|
|
|
|
|
// 初始化410 v2工具箱
|
|
|
const v2ToolBy410Abi = require('../../abi/410_V2_TOOLS.json')
|
|
|
@@ -266,6 +267,8 @@ export class LpMaintenance {
|
|
|
async run() {
|
|
|
logger.debug('LP maintenance start.')
|
|
|
while (true) {
|
|
|
+ await Time.delay(12000)
|
|
|
+
|
|
|
this.showMemory('a loop...')
|
|
|
|
|
|
try {
|
|
|
@@ -295,6 +298,8 @@ export class LpMaintenance {
|
|
|
const size = 2000
|
|
|
for (let from = 0; from < allTypeLpList.length; from += size) {
|
|
|
// logger.debug(`${from}, ${allTypeLpList.length}`)
|
|
|
+ await Time.delay(168)
|
|
|
+
|
|
|
const lpR0R1Info: any = await v2ToolBy410.methods.getPairSBalance(lpAddressList.slice(from, from + size)).call()
|
|
|
const r0s = lpR0R1Info.amounts0
|
|
|
const r1s = lpR0R1Info.amounts1
|