龚成明 3 жил өмнө
parent
commit
9d4f5e1140

+ 2 - 2
scripts/ready/pushv2.ts

@@ -35,7 +35,7 @@ async function handlePosition(router: String, factory: String) {
 async function handleAFactory(routerObj: any, position: number, pairsLength: number, v2_410_tool: any) {
   const lpList: any = []
 
-  while (position + 1 < pairsLength) {
+  while (position < pairsLength) {
     try {
       const info = await v2_410_tool.methods.getPairIdInfo(routerObj.factory, position).call()
 
@@ -89,7 +89,7 @@ async function getAllLp(v2Router: any, fromZero: boolean, v2_410_tool: any, v2_f
 
     if (position + 1 < pairsLength) {
       logger.debug(`Router address: ${v2Router.router}`)
-      logger.debug(`factory: ${v2_factory_address}, ${position} / ${pairsLength}.`)
+      logger.debug(`factory: ${v2_factory_address}, ${position + 1} / ${pairsLength}.`)
 
       return await handleAFactory(v2Router, position, pairsLength, v2_410_tool)
     }