ソースを参照

r0, r1 修复

skyfffire 3 年 前
コミット
9007210196
1 ファイル変更5 行追加4 行削除
  1. 5 4
      scripts/pullv2.ts

+ 5 - 4
scripts/pullv2.ts

@@ -50,14 +50,14 @@ async function handleAFactory(router: String, factory: String, position: number,
 
       const data = {
         LP: info['0'],
-        decimals0: info['4'],
+        decimals0: info['3'],
         decimals1: info['7'],
         factory: factory,
         feei: 30,
         id: position,
         name: `${router.slice(2, 4) + router.slice(-2)}_${info['2']}_${info['6']}`,
-        r0: 0,
-        r1: 0,
+        r0: info['4'],
+        r1: info['8'],
         router: router,
         sum2: replaceAll(BigNumber.from(info['1']).add(BigNumber.from(info['5']))._hex, '0x0', '0x'),
         symbol0: info['2'],
@@ -65,7 +65,8 @@ async function handleAFactory(router: String, factory: String, position: number,
         token0: info['1'],
         token1: info['5']
       }
-      logger.debug(await History.appendOrUpdate('0', info['0'], data), `, hash: ${info['0']}`)
+      const insertRst = await History.appendOrUpdate('0', info['0'], data)
+      logger.debug(insertRst.msg, `, hash: ${info['0']}`)
 
       // 每十次更新一次position
       if (position % 50 == 0) {