|
|
@@ -41,7 +41,7 @@ export class PullAndPush {
|
|
|
return 0
|
|
|
}
|
|
|
|
|
|
- async getPoolByPosition(routerObj: any, position: number, v2ToolBy410: any) {
|
|
|
+ async getV2PoolByPosition(routerObj: any, position: number, v2ToolBy410: any) {
|
|
|
try {
|
|
|
const info = await v2ToolBy410.methods.getPairIdInfo(routerObj.factory, position).call()
|
|
|
|
|
|
@@ -184,7 +184,7 @@ export class PullAndPush {
|
|
|
while (position + 1 < pairsLength) {
|
|
|
logger.debug(`${position + 1} / ${pairsLength}`)
|
|
|
// 1. 获取lp
|
|
|
- const lp = await this.getPoolByPosition(routerObj, position, v2ToolBy410)
|
|
|
+ const lp = await this.getV2PoolByPosition(routerObj, position, v2ToolBy410)
|
|
|
// 2. 保存Lp信息
|
|
|
await this.saveLp(lp, '0')
|
|
|
// 3. 保存Lp的Token到Token表
|
|
|
@@ -211,6 +211,7 @@ export class PullAndPush {
|
|
|
|
|
|
if (this.fromHead && this.isFirst) {
|
|
|
this.isFirst = false
|
|
|
+ this.fromHead = false
|
|
|
}
|
|
|
}
|
|
|
}
|