|
|
@@ -2,6 +2,8 @@ const logger = require("../../utils/logger");
|
|
|
const BaseModel = require("../../model/base-model");
|
|
|
const V2ToolAbi = require('../../abi/UNIV2_TOOLS_ABI.json')
|
|
|
const V3ToolAbi = require('../../abi/UNIV3_TOOLS_ABI.json')
|
|
|
+const FactoryLib = require("./factory-lib");
|
|
|
+const TokenLib = require("./token-lib");
|
|
|
|
|
|
module.exports = class LpLib {
|
|
|
static LEVEL = {
|
|
|
@@ -12,11 +14,12 @@ module.exports = class LpLib {
|
|
|
TOP: 'top'
|
|
|
}
|
|
|
|
|
|
- constructor(web3, chain, factoryLib, tokenLib) {
|
|
|
+ constructor(web3, chain) {
|
|
|
this.web3 = web3
|
|
|
this.chain = chain
|
|
|
- this.factoryLib = factoryLib
|
|
|
- this.tokenLib = tokenLib
|
|
|
+
|
|
|
+ this.factoryLib = new FactoryLib(this.web3, this.chain)
|
|
|
+ this.tokenLib = new TokenLib(this.web3, this.chain)
|
|
|
|
|
|
this.v2LpModel = new BaseModel(this.chain.id, BaseModel.MODULES.V2_LP)
|
|
|
this.v3LpModel = new BaseModel(this.chain.id, BaseModel.MODULES.V3_LP)
|
|
|
@@ -119,4 +122,8 @@ module.exports = class LpLib {
|
|
|
throw Error(`Unknown factory version: ${factory.version}, hash is: ${factory.hash}.`)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ async getV2LpList() {
|
|
|
+
|
|
|
+ }
|
|
|
}
|