@paraswap/dex-lib 2.19.1-swaap-v2.7 → 2.19.1
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.
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Solidly } from '../solidly';
|
|
2
|
+
import { SolidlyPair } from '../types';
|
|
3
|
+
import { Network } from '../../../constants';
|
|
4
|
+
import { IDexHelper } from '../../../dex-helper';
|
|
5
|
+
export declare class Chronos extends Solidly {
|
|
6
|
+
protected network: Network;
|
|
7
|
+
protected dexHelper: IDexHelper;
|
|
8
|
+
static dexKeysWithNetwork: {
|
|
9
|
+
key: string;
|
|
10
|
+
networks: Network[];
|
|
11
|
+
}[];
|
|
12
|
+
constructor(network: Network, dexKey: string, dexHelper: IDexHelper);
|
|
13
|
+
protected getFeesMultiCallData(pair: SolidlyPair): {
|
|
14
|
+
callEntry: {
|
|
15
|
+
target: string;
|
|
16
|
+
callData: string;
|
|
17
|
+
};
|
|
18
|
+
callDecoder: (values: any[]) => number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Chronos = void 0;
|
|
7
|
+
const solidly_1 = require("../solidly");
|
|
8
|
+
const abi_1 = require("@ethersproject/abi");
|
|
9
|
+
const utils_1 = require("../../../utils");
|
|
10
|
+
const config_1 = require("../config");
|
|
11
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
12
|
+
const ChronosFactoryABI = [
|
|
13
|
+
{
|
|
14
|
+
inputs: [{ internalType: 'bool', name: '_stable', type: 'bool' }],
|
|
15
|
+
name: 'getFee',
|
|
16
|
+
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
|
17
|
+
stateMutability: 'view',
|
|
18
|
+
type: 'function',
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
const chronosFactoryIface = new abi_1.Interface(ChronosFactoryABI);
|
|
22
|
+
class Chronos extends solidly_1.Solidly {
|
|
23
|
+
constructor(network, dexKey, dexHelper) {
|
|
24
|
+
super(network, dexKey, dexHelper, true);
|
|
25
|
+
this.network = network;
|
|
26
|
+
this.dexHelper = dexHelper;
|
|
27
|
+
}
|
|
28
|
+
getFeesMultiCallData(pair) {
|
|
29
|
+
const callEntry = {
|
|
30
|
+
target: this.factoryAddress,
|
|
31
|
+
callData: chronosFactoryIface.encodeFunctionData('getFee', [pair.stable]),
|
|
32
|
+
};
|
|
33
|
+
const callDecoder = (values) => parseInt(chronosFactoryIface
|
|
34
|
+
.decodeFunctionResult('getFee', values)[0]
|
|
35
|
+
.toString());
|
|
36
|
+
return {
|
|
37
|
+
callEntry,
|
|
38
|
+
callDecoder,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.Chronos = Chronos;
|
|
43
|
+
Chronos.dexKeysWithNetwork = (0, utils_1.getDexKeysWithNetwork)(lodash_1.default.pick(config_1.SolidlyConfig, ['Chronos']));
|
|
44
|
+
//# sourceMappingURL=chronos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chronos.js","sourceRoot":"","sources":["../../../../src/dex/solidly/forks-override/chronos.ts"],"names":[],"mappings":";;;;;;AAAA,wCAAqC;AAIrC,4CAA+C;AAC/C,0CAAuD;AACvD,sCAA0C;AAC1C,oDAAuB;AAEvB,MAAM,iBAAiB,GAAG;IACxB;QACE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACjE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjE,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG,IAAI,eAAS,CAAC,iBAAiB,CAAC,CAAC;AAE7D,MAAa,OAAQ,SAAQ,iBAAO;IAIlC,YACY,OAAgB,EAC1B,MAAc,EACJ,SAAqB;QAE/B,KAAK,CACH,OAAO,EACP,MAAM,EACN,SAAS,EACT,IAAI,CACL,CAAC;QATQ,YAAO,GAAP,OAAO,CAAS;QAEhB,cAAS,GAAT,SAAS,CAAY;IAQjC,CAAC;IAES,oBAAoB,CAAC,IAAiB;QAC9C,MAAM,SAAS,GAAG;YAChB,MAAM,EAAE,IAAI,CAAC,cAAc;YAC3B,QAAQ,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC1E,CAAC;QACF,MAAM,WAAW,GAAG,CAAC,MAAa,EAAE,EAAE,CACpC,QAAQ,CACN,mBAAmB;aAChB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;aACzC,QAAQ,EAAE,CACd,CAAC;QAEJ,OAAO;YACL,SAAS;YACT,WAAW;SACZ,CAAC;IACJ,CAAC;;AAjCH,0BAkCC;AAjCe,0BAAkB,GAC9B,IAAA,6BAAqB,EAAC,gBAAC,CAAC,IAAI,CAAC,sBAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paraswap/dex-lib",
|
|
3
|
-
"version": "2.19.1
|
|
3
|
+
"version": "2.19.1",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"types": "build/index.d.ts",
|
|
6
6
|
"repository": "https://github.com/paraswap/paraswap-dex-lib",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@types/node": "^17.0.21",
|
|
21
21
|
"@typescript-eslint/eslint-plugin": "^5.47.0",
|
|
22
22
|
"@typescript-eslint/parser": "^5.47.0",
|
|
23
|
-
"axios": "0.26.0",
|
|
24
23
|
"change-case": "^4.1.2",
|
|
25
24
|
"dotenv": "16.0.0",
|
|
26
25
|
"eslint": "^8.30.0",
|