@paraswap/dex-lib 2.41.3-fvm-to-velocimeter → 2.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,7 +18,7 @@ const velocimeterFactoryABI = [
|
|
|
18
18
|
type: 'function',
|
|
19
19
|
},
|
|
20
20
|
];
|
|
21
|
-
const
|
|
21
|
+
const velocimeterFactoryIface = new abi_1.Interface(velocimeterFactoryABI);
|
|
22
22
|
class Velocimeter extends solidly_1.Solidly {
|
|
23
23
|
constructor(network, dexKey, dexHelper) {
|
|
24
24
|
super(network, dexKey, dexHelper, true);
|
|
@@ -28,9 +28,9 @@ class Velocimeter extends solidly_1.Solidly {
|
|
|
28
28
|
getFeesMultiCallData(pair) {
|
|
29
29
|
const callEntry = {
|
|
30
30
|
target: this.factoryAddress,
|
|
31
|
-
callData:
|
|
31
|
+
callData: velocimeterFactoryIface.encodeFunctionData('getFee', [pair.exchange]),
|
|
32
32
|
};
|
|
33
|
-
const callDecoder = (values) => parseInt(
|
|
33
|
+
const callDecoder = (values) => parseInt(velocimeterFactoryIface.decodeFunctionResult('getFee', values)[0].toString());
|
|
34
34
|
return {
|
|
35
35
|
callEntry,
|
|
36
36
|
callDecoder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velocimeter.js","sourceRoot":"","sources":["../../../../src/dex/solidly/forks-override/velocimeter.ts"],"names":[],"mappings":";;;;;;AAAA,wCAAqC;AAIrC,4CAA+C;AAC/C,0CAAuD;AACvD,sCAA0C;AAC1C,oDAAuB;AAEvB,MAAM,qBAAqB,GAAG;IAC5B;QACE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACrE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,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C,CAAC,QAAQ,EAAE,CAC7E,CAAC;QAEJ,OAAO;YACL,SAAS;YACT,WAAW;SACZ,CAAC;IACJ,CAAC;;AA/BH,kCAgCC;AA/Be,8BAAkB,GAC9B,IAAA,6BAAqB,EAAC,gBAAC,CAAC,IAAI,CAAC,sBAAa,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ const velocimeterFactoryABI = [
|
|
|
17
17
|
},
|
|
18
18
|
];
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const velocimeterFactoryIface = new Interface(velocimeterFactoryABI);
|
|
21
21
|
|
|
22
22
|
export class Velocimeter extends Solidly {
|
|
23
23
|
public static dexKeysWithNetwork: { key: string; networks: Network[] }[] =
|
|
@@ -39,11 +39,11 @@ export class Velocimeter extends Solidly {
|
|
|
39
39
|
protected getFeesMultiCallData(pair: SolidlyPair) {
|
|
40
40
|
const callEntry = {
|
|
41
41
|
target: this.factoryAddress,
|
|
42
|
-
callData:
|
|
42
|
+
callData: velocimeterFactoryIface.encodeFunctionData('getFee', [pair.exchange]),
|
|
43
43
|
};
|
|
44
44
|
const callDecoder = (values: any[]) =>
|
|
45
45
|
parseInt(
|
|
46
|
-
|
|
46
|
+
velocimeterFactoryIface.decodeFunctionResult('getFee', values)[0].toString(),
|
|
47
47
|
);
|
|
48
48
|
|
|
49
49
|
return {
|