@paraswap/dex-lib 4.8.14 → 4.8.15
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.
- package/build/abi/{apex-defi/ApexDefiRouter.abi.json → BProtocol.json} +573 -538
- package/build/abi/Jarvis.json +1172 -0
- package/build/abi/{apex-defi/ApexDefiFactory.abi.json → MStableAsset.json} +781 -985
- package/build/abi/{apex-defi/ApexDefiWrapperFactory.abi.json → OneInchLp.json} +766 -569
- package/build/abi/Onebit.json +736 -0
- package/build/abi/Shell.json +1294 -0
- package/build/abi/TraderJoeV2Router.json +50 -0
- package/build/abi/wUSDM.json +757 -0
- package/build/abi/zrx.v2.json +1967 -0
- package/build/abi/zrx.v3.json +3454 -0
- package/build/abi/zrx.v4.json +2193 -0
- package/build/dex/OneInchLp.d.ts +24 -0
- package/build/dex/OneInchLp.js +43 -0
- package/build/dex/OneInchLp.js.map +1 -0
- package/build/dex/algebra/algebra.d.ts +4 -0
- package/build/dex/algebra/algebra.js +39 -14
- package/build/dex/algebra/algebra.js.map +1 -1
- package/build/dex/bProtocol/bProtocol.d.ts +15 -0
- package/build/dex/bProtocol/bProtocol.js +56 -0
- package/build/dex/bProtocol/bProtocol.js.map +1 -0
- package/build/dex/bProtocol/types.d.ts +11 -0
- package/build/dex/bProtocol/types.js +8 -0
- package/build/dex/bProtocol/types.js.map +1 -0
- package/build/dex/infusion/infusion-stable-pool.d.ts +1 -1
- package/build/dex/infusion/infusion-stable-pool.js +1 -1
- package/build/dex/infusion/infusion-stable-pool.js.map +1 -1
- package/build/dex/infusion/infusion.d.ts +3 -3
- package/build/dex/infusion/infusion.js +104 -65
- package/build/dex/infusion/infusion.js.map +1 -1
- package/build/dex/jarvis.d.ts +56 -0
- package/build/dex/jarvis.js +163 -0
- package/build/dex/jarvis.js.map +1 -0
- package/build/dex/mStable.d.ts +44 -0
- package/build/dex/mStable.js +75 -0
- package/build/dex/mStable.js.map +1 -0
- package/build/dex/onebit/onebit.d.ts +16 -0
- package/build/dex/onebit/onebit.js +61 -0
- package/build/dex/onebit/onebit.js.map +1 -0
- package/build/dex/onebit/types.d.ts +14 -0
- package/build/dex/onebit/types.js +8 -0
- package/build/dex/onebit/types.js.map +1 -0
- package/build/dex/pancakeswap-v3/pancakeswap-v3.d.ts +4 -0
- package/build/dex/pancakeswap-v3/pancakeswap-v3.js +40 -17
- package/build/dex/pancakeswap-v3/pancakeswap-v3.js.map +1 -1
- package/build/dex/{yo → se-vlr}/config.d.ts +1 -1
- package/build/dex/se-vlr/config.js +24 -0
- package/build/dex/se-vlr/config.js.map +1 -0
- package/build/dex/{stabull/stabull-pool.d.ts → se-vlr/se-vlr-pool.d.ts} +6 -13
- package/build/dex/se-vlr/se-vlr-pool.js +70 -0
- package/build/dex/se-vlr/se-vlr-pool.js.map +1 -0
- package/build/dex/se-vlr/se-vlr.d.ts +35 -0
- package/build/dex/se-vlr/se-vlr.js +131 -0
- package/build/dex/se-vlr/se-vlr.js.map +1 -0
- package/build/dex/se-vlr/types.d.ts +6 -0
- package/build/dex/{yo → se-vlr}/types.js.map +1 -1
- package/build/dex/shell.d.ts +25 -0
- package/build/dex/shell.js +41 -0
- package/build/dex/shell.js.map +1 -0
- package/build/dex/solidly/forks-override/aerodrome.d.ts +1 -1
- package/build/dex/solidly/forks-override/aerodrome.js +14 -18
- package/build/dex/solidly/forks-override/aerodrome.js.map +1 -1
- package/build/dex/trader-joe-v2.d.ts +40 -0
- package/build/dex/trader-joe-v2.js +74 -0
- package/build/dex/trader-joe-v2.js.map +1 -0
- package/build/dex/uniswap-v2/uniswap-v2.js +1 -4
- package/build/dex/uniswap-v2/uniswap-v2.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3-new.d.ts +94 -0
- package/build/dex/uniswap-v3/uniswap-v3-new.js +923 -0
- package/build/dex/uniswap-v3/uniswap-v3-new.js.map +1 -0
- package/build/dex/uniswap-v4/contract-math/Position.d.ts +0 -6
- package/build/dex/uniswap-v4/contract-math/Position.js +0 -29
- package/build/dex/uniswap-v4/contract-math/Position.js.map +1 -1
- package/build/dex/{stabull → usual-bond}/config.d.ts +1 -1
- package/build/dex/usual-bond/config.js +13 -0
- package/build/dex/usual-bond/config.js.map +1 -0
- package/build/dex/usual-bond/types.d.ts +7 -0
- package/build/dex/{stabull → usual-bond}/types.js.map +1 -1
- package/build/dex/{aave-pt-to-underlying/aave-pt-to-underlying.d.ts → usual-bond/usual-bond.d.ts} +18 -23
- package/build/dex/usual-bond/usual-bond.js +176 -0
- package/build/dex/usual-bond/usual-bond.js.map +1 -0
- package/build/dex/wusdm/config.d.ts +3 -0
- package/build/dex/wusdm/config.js +43 -0
- package/build/dex/wusdm/config.js.map +1 -0
- package/build/dex/wusdm/constants.d.ts +2 -0
- package/build/dex/wusdm/constants.js +6 -0
- package/build/dex/wusdm/constants.js.map +1 -0
- package/build/dex/wusdm/types.d.ts +18 -0
- package/build/dex/wusdm/types.js +11 -0
- package/build/dex/wusdm/types.js.map +1 -0
- package/build/dex/wusdm/wusdm-pool.d.ts +21 -0
- package/build/dex/wusdm/wusdm-pool.js +74 -0
- package/build/dex/wusdm/wusdm-pool.js.map +1 -0
- package/build/dex/wusdm/wusdm.d.ts +46 -0
- package/build/dex/wusdm/wusdm.js +243 -0
- package/build/dex/wusdm/wusdm.js.map +1 -0
- package/build/dex/zerox/config.d.ts +2 -0
- package/build/dex/zerox/config.js +33 -0
- package/build/dex/zerox/config.js.map +1 -0
- package/build/dex/zerox/index.d.ts +22 -0
- package/build/dex/zerox/index.js +225 -0
- package/build/dex/zerox/index.js.map +1 -0
- package/build/dex/zerox/order.d.ts +88 -0
- package/build/dex/zerox/order.js +53 -0
- package/build/dex/zerox/order.js.map +1 -0
- package/build/dex/zerox/types.d.ts +73 -0
- package/build/dex/zerox/types.js +21 -0
- package/build/dex/zerox/types.js.map +1 -0
- package/package.json +1 -1
- package/build/abi/PendleRouterStatic.json +0 -19
- package/build/abi/apex-defi/ApexDefiToken.abi.json +0 -229
- package/build/abi/apex-defi/ApexDefiWrapper.abi.json +0 -92
- package/build/abi/clear/ClearFactory.json +0 -71
- package/build/abi/clear/ClearSwap.json +0 -334
- package/build/abi/clear/ClearVault.json +0 -20
- package/build/abi/ekubo-v3/boosted-fees-data-fetcher.json +0 -108
- package/build/abi/ekubo-v3/boosted-fees.json +0 -538
- package/build/abi/pangolin-v3/PangolinV3StateMulticall.abi.json +0 -796
- package/build/abi/pendle/pendle-deployer.abi.json +0 -520
- package/build/abi/pendle/pendle-oracle.abi.json +0 -413
- package/build/abi/ring-v2/few-wrapped-token.json +0 -587
- package/build/abi/ring-v2/ring-v2-factory.json +0 -125
- package/build/abi/ring-v2/ring-v2-pool.json +0 -461
- package/build/abi/ring-v2/ring-v2-router.json +0 -332
- package/build/abi/stabull/stabull-curve.json +0 -738
- package/build/abi/stabull/stabull-router.json +0 -76
- package/build/abi/uniswap-v4/hooks/SpotDynamicFeeManager.json +0 -26
- package/build/abi/uniswap-v4/hooks/SpotHook.json +0 -54
- package/build/abi/uniswap-v4/hooks/SpotPolicyManager.json +0 -45
- package/build/abi/uniswap-v4/hooks/cabalcoin-hook.abi.json +0 -682
- package/build/abi/uniswap-v4/hooks/fee-hook.abi.json +0 -1335
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.d.ts +0 -29
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js +0 -153
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js +0 -323
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/config.d.ts +0 -3
- package/build/dex/aave-pt-to-underlying/config.js +0 -24
- package/build/dex/aave-pt-to-underlying/config.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/constants.d.ts +0 -2
- package/build/dex/aave-pt-to-underlying/constants.js +0 -6
- package/build/dex/aave-pt-to-underlying/constants.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/types.d.ts +0 -24
- package/build/dex/aave-pt-to-underlying/types.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.d.ts +0 -39
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js +0 -244
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/config.d.ts +0 -3
- package/build/dex/aave-pt-to-usdc/config.js +0 -47
- package/build/dex/aave-pt-to-usdc/config.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/constants.d.ts +0 -2
- package/build/dex/aave-pt-to-usdc/constants.js +0 -6
- package/build/dex/aave-pt-to-usdc/constants.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/types.d.ts +0 -22
- package/build/dex/aave-pt-to-usdc/types.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-factory.d.ts +0 -26
- package/build/dex/apex-defi/apex-defi-factory.js +0 -53
- package/build/dex/apex-defi/apex-defi-factory.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-pool.d.ts +0 -55
- package/build/dex/apex-defi/apex-defi-pool.js +0 -247
- package/build/dex/apex-defi/apex-defi-pool.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-wrapper-factory.d.ts +0 -57
- package/build/dex/apex-defi/apex-defi-wrapper-factory.js +0 -250
- package/build/dex/apex-defi/apex-defi-wrapper-factory.js.map +0 -1
- package/build/dex/apex-defi/apex-defi.d.ts +0 -97
- package/build/dex/apex-defi/apex-defi.js +0 -1021
- package/build/dex/apex-defi/apex-defi.js.map +0 -1
- package/build/dex/apex-defi/config.d.ts +0 -4
- package/build/dex/apex-defi/config.js +0 -138
- package/build/dex/apex-defi/config.js.map +0 -1
- package/build/dex/apex-defi/types.d.ts +0 -32
- package/build/dex/apex-defi/types.js +0 -3
- package/build/dex/apex-defi/types.js.map +0 -1
- package/build/dex/apex-defi/utils.d.ts +0 -46
- package/build/dex/apex-defi/utils.js +0 -133
- package/build/dex/apex-defi/utils.js.map +0 -1
- package/build/dex/clear/clear-factory.d.ts +0 -33
- package/build/dex/clear/clear-factory.js +0 -123
- package/build/dex/clear/clear-factory.js.map +0 -1
- package/build/dex/clear/clear.d.ts +0 -53
- package/build/dex/clear/clear.js +0 -311
- package/build/dex/clear/clear.js.map +0 -1
- package/build/dex/clear/config.d.ts +0 -3
- package/build/dex/clear/config.js +0 -14
- package/build/dex/clear/config.js.map +0 -1
- package/build/dex/clear/types.d.ts +0 -18
- package/build/dex/clear/types.js +0 -3
- package/build/dex/clear/types.js.map +0 -1
- package/build/dex/ekubo-v3/extension-type.d.ts +0 -9
- package/build/dex/ekubo-v3/extension-type.js +0 -36
- package/build/dex/ekubo-v3/extension-type.js.map +0 -1
- package/build/dex/ekubo-v3/pools/boosted-fees.d.ts +0 -39
- package/build/dex/ekubo-v3/pools/boosted-fees.js +0 -189
- package/build/dex/ekubo-v3/pools/boosted-fees.js.map +0 -1
- package/build/dex/ekubo-v3/pools/concentrated.d.ts +0 -47
- package/build/dex/ekubo-v3/pools/concentrated.js +0 -324
- package/build/dex/ekubo-v3/pools/concentrated.js.map +0 -1
- package/build/dex/ekubo-v3/pools/timed.d.ts +0 -25
- package/build/dex/ekubo-v3/pools/timed.js +0 -91
- package/build/dex/ekubo-v3/pools/timed.js.map +0 -1
- package/build/dex/maker-psm/maker-psm-event-pool.d.ts +0 -43
- package/build/dex/maker-psm/maker-psm-event-pool.js +0 -132
- package/build/dex/maker-psm/maker-psm-event-pool.js.map +0 -1
- package/build/dex/miro-migrator/miro-migrator-state.d.ts +0 -27
- package/build/dex/miro-migrator/miro-migrator-state.js +0 -89
- package/build/dex/miro-migrator/miro-migrator-state.js.map +0 -1
- package/build/dex/stabull/config.js +0 -177
- package/build/dex/stabull/config.js.map +0 -1
- package/build/dex/stabull/stabull-pool.js +0 -113
- package/build/dex/stabull/stabull-pool.js.map +0 -1
- package/build/dex/stabull/stabull.d.ts +0 -55
- package/build/dex/stabull/stabull.js +0 -286
- package/build/dex/stabull/stabull.js.map +0 -1
- package/build/dex/stabull/types.d.ts +0 -21
- package/build/dex/stabull/types.js +0 -3
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.d.ts +0 -4
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js +0 -56
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/arena.d.ts +0 -6
- package/build/dex/uniswap-v4/hooks/arena.js +0 -10
- package/build/dex/uniswap-v4/hooks/arena.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.js +0 -2
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.d.ts +0 -7
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js +0 -28
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js +0 -2
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.d.ts +0 -7
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js +0 -28
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/fee-hook/types.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/fee-hook/types.js +0 -2
- package/build/dex/uniswap-v4/hooks/fee-hook/types.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/index.d.ts +0 -1
- package/build/dex/uniswap-v4/hooks/index.js +0 -18
- package/build/dex/uniswap-v4/hooks/index.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/spot.d.ts +0 -15
- package/build/dex/uniswap-v4/hooks/spot.js +0 -109
- package/build/dex/uniswap-v4/hooks/spot.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/template.d.ts +0 -150
- package/build/dex/uniswap-v4/hooks/template.js +0 -104
- package/build/dex/uniswap-v4/hooks/template.js.map +0 -1
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.d.ts +0 -26
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.js +0 -75
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.js.map +0 -1
- package/build/dex/usual/usual-usdc-usdc.d.ts +0 -17
- package/build/dex/usual/usual-usdc-usdc.js +0 -59
- package/build/dex/usual/usual-usdc-usdc.js.map +0 -1
- package/build/dex/yo/config.js +0 -21
- package/build/dex/yo/config.js.map +0 -1
- package/build/dex/yo/types.d.ts +0 -13
- package/build/dex/yo/types.js +0 -3
- package/build/dex/yo/yo-pool.d.ts +0 -13
- package/build/dex/yo/yo-pool.js +0 -26
- package/build/dex/yo/yo-pool.js.map +0 -1
- package/build/dex/yo/yo.d.ts +0 -39
- package/build/dex/yo/yo.js +0 -248
- package/build/dex/yo/yo.js.map +0 -1
- package/build/implementations/api-paraswap-sdk.d.ts +0 -25
- package/build/implementations/api-paraswap-sdk.js +0 -102
- package/build/implementations/api-paraswap-sdk.js.map +0 -1
- /package/build/dex/{aave-pt-to-underlying → se-vlr}/types.js +0 -0
- /package/build/dex/{aave-pt-to-usdc → usual-bond}/types.js +0 -0
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimedPoolState = void 0;
|
|
4
|
-
exports.estimatedCurrentTime = estimatedCurrentTime;
|
|
5
|
-
exports.realLastTime = realLastTime;
|
|
6
|
-
exports.approximateExtraDistinctTimeBitmapLookups = approximateExtraDistinctTimeBitmapLookups;
|
|
7
|
-
const utils_1 = require("../utils");
|
|
8
|
-
const constants_1 = require("../../../constants");
|
|
9
|
-
const SLOT_DURATION_SECS_BY_CHAIN_ID = {
|
|
10
|
-
[constants_1.Network.MAINNET]: 12n,
|
|
11
|
-
[constants_1.Network.ARBITRUM]: 1n,
|
|
12
|
-
};
|
|
13
|
-
var TimedPoolState;
|
|
14
|
-
(function (TimedPoolState) {
|
|
15
|
-
function fromQuoter(token0Rate, token1Rate, lastTime, virtualDeltas) {
|
|
16
|
-
return {
|
|
17
|
-
token0Rate,
|
|
18
|
-
token1Rate,
|
|
19
|
-
lastTime: lastTime,
|
|
20
|
-
virtualDeltas,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
TimedPoolState.fromQuoter = fromQuoter;
|
|
24
|
-
function applyRateDeltaBoundaries(timedPoolState, boundaries) {
|
|
25
|
-
const { virtualDeltas: deltas, lastTime: lastExecutionTime } = timedPoolState;
|
|
26
|
-
let { token0Rate, token1Rate } = timedPoolState;
|
|
27
|
-
let startIndex = 0;
|
|
28
|
-
for (const [time, boundaryDelta0, boundaryDelta1] of boundaries) {
|
|
29
|
-
if (time > lastExecutionTime) {
|
|
30
|
-
let idx = findTimeDeltaIndex(deltas, time, startIndex);
|
|
31
|
-
if (idx < 0) {
|
|
32
|
-
idx = ~idx;
|
|
33
|
-
deltas.splice(idx, 0, { time, delta0: 0n, delta1: 0n });
|
|
34
|
-
}
|
|
35
|
-
const delta = deltas[idx];
|
|
36
|
-
const next0 = delta.delta0 + boundaryDelta0;
|
|
37
|
-
const next1 = delta.delta1 + boundaryDelta1;
|
|
38
|
-
if (next0 === 0n && next1 === 0n) {
|
|
39
|
-
deltas.splice(idx, 1);
|
|
40
|
-
startIndex = idx;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
delta.delta0 = next0;
|
|
44
|
-
delta.delta1 = next1;
|
|
45
|
-
startIndex = idx + 1;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
token0Rate += boundaryDelta0;
|
|
50
|
-
token1Rate += boundaryDelta1;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
timedPoolState.token0Rate = token0Rate;
|
|
54
|
-
timedPoolState.token1Rate = token1Rate;
|
|
55
|
-
}
|
|
56
|
-
TimedPoolState.applyRateDeltaBoundaries = applyRateDeltaBoundaries;
|
|
57
|
-
function pruneDeltasAtOrBefore(deltas, timestamp) {
|
|
58
|
-
while (deltas.length > 0 && deltas[0].time <= timestamp) {
|
|
59
|
-
deltas.shift();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
TimedPoolState.pruneDeltasAtOrBefore = pruneDeltasAtOrBefore;
|
|
63
|
-
function findTimeDeltaIndex(deltas, searchTime, startIndex = 0) {
|
|
64
|
-
let l = startIndex;
|
|
65
|
-
let r = deltas.length - 1;
|
|
66
|
-
while (l <= r) {
|
|
67
|
-
const mid = Math.floor((l + r) / 2);
|
|
68
|
-
const midTime = deltas[mid].time;
|
|
69
|
-
if (midTime === searchTime) {
|
|
70
|
-
return mid;
|
|
71
|
-
}
|
|
72
|
-
else if (midTime < searchTime) {
|
|
73
|
-
l = mid + 1;
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
r = mid - 1;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return ~l;
|
|
80
|
-
}
|
|
81
|
-
})(TimedPoolState || (exports.TimedPoolState = TimedPoolState = {}));
|
|
82
|
-
function estimatedCurrentTime(last, chainId) {
|
|
83
|
-
return (0, utils_1.bigintMax)(BigInt(Math.floor(Date.now() / 1000)), last + SLOT_DURATION_SECS_BY_CHAIN_ID[chainId]);
|
|
84
|
-
}
|
|
85
|
-
function realLastTime(now, last) {
|
|
86
|
-
return now - ((now - last) & 0xffffffffn);
|
|
87
|
-
}
|
|
88
|
-
function approximateExtraDistinctTimeBitmapLookups(startTime, endTime) {
|
|
89
|
-
return Number((endTime >> 16n) - (startTime >> 16n));
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingUR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GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YAEjC,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;gBAC3B,OAAO,GAAG,CAAC;YACb,CAAC;iBAAM,IAAI,OAAO,GAAG,UAAU,EAAE,CAAC;gBAChC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;AACH,CAAC,EAnGgB,cAAc,8BAAd,cAAc,QAmG9B;AAED,SAAgB,oBAAoB,CAClC,IAAY,EACZ,OAA8B;IAE9B,OAAO,IAAA,iBAAS,EACd,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,EACrC,IAAI,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAC/C,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAC,GAAW,EAAE,IAAY;IACpD,OAAO,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED,SAAgB,yCAAyC,CACvD,SAAiB,EACjB,OAAe;IAEf,OAAO,MAAM,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { DeepReadonly } from 'ts-essentials';
|
|
2
|
-
import { Address, Log, Logger } from '../../types';
|
|
3
|
-
import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
|
|
4
|
-
import { IDexHelper } from '../../dex-helper/idex-helper';
|
|
5
|
-
import { PoolState, PoolConfig } from './types';
|
|
6
|
-
export declare class MakerPsmEventPool extends StatefulEventSubscriber<PoolState> {
|
|
7
|
-
protected network: number;
|
|
8
|
-
protected dexHelper: IDexHelper;
|
|
9
|
-
poolConfig: PoolConfig;
|
|
10
|
-
protected vatAddress: Address;
|
|
11
|
-
handlers: {
|
|
12
|
-
[event: string]: (event: any, pool: PoolState, log: Log) => PoolState;
|
|
13
|
-
};
|
|
14
|
-
logDecoder: (log: Log) => any;
|
|
15
|
-
to18ConversionFactor: bigint;
|
|
16
|
-
bytes32Tout: string;
|
|
17
|
-
bytes32Tin: string;
|
|
18
|
-
constructor(parentName: string, network: number, dexHelper: IDexHelper, logger: Logger, poolConfig: PoolConfig, vatAddress: Address);
|
|
19
|
-
handleFile(event: any, pool: PoolState, log: Log): PoolState;
|
|
20
|
-
handleSellGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
21
|
-
handleBuyGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
22
|
-
getIdentifier(): string;
|
|
23
|
-
/**
|
|
24
|
-
* The function is called every time any of the subscribed
|
|
25
|
-
* addresses release log. The function accepts the current
|
|
26
|
-
* state, updates the state according to the log, and returns
|
|
27
|
-
* the updated state.
|
|
28
|
-
* @param state - Current state of event subscriber
|
|
29
|
-
* @param log - Log released by one of the subscribed addresses
|
|
30
|
-
* @returns Updates state of the event subscriber after the log
|
|
31
|
-
*/
|
|
32
|
-
protected processLog(state: DeepReadonly<PoolState>, log: Readonly<Log>): DeepReadonly<PoolState> | null;
|
|
33
|
-
/**
|
|
34
|
-
* The function generates state using on-chain calls. This
|
|
35
|
-
* function is called to regenerate state if the event based
|
|
36
|
-
* system fails to fetch events and the local state is no
|
|
37
|
-
* more correct.
|
|
38
|
-
* @param blockNumber - Blocknumber for which the state should
|
|
39
|
-
* should be generated
|
|
40
|
-
* @returns state of the event subscriber at blocknumber
|
|
41
|
-
*/
|
|
42
|
-
generateState(blockNumber: number): Promise<Readonly<PoolState>>;
|
|
43
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
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.MakerPsmEventPool = void 0;
|
|
7
|
-
const abi_1 = require("@ethersproject/abi");
|
|
8
|
-
const stateful_event_subscriber_1 = require("../../stateful-event-subscriber");
|
|
9
|
-
const utils_1 = require("../../utils");
|
|
10
|
-
const psm_json_1 = __importDefault(require("../../abi/maker-psm/psm.json"));
|
|
11
|
-
const vat_json_1 = __importDefault(require("../../abi/maker-psm/vat.json"));
|
|
12
|
-
const vatInterface = new abi_1.Interface(vat_json_1.default);
|
|
13
|
-
const psmInterface = new abi_1.Interface(psm_json_1.default);
|
|
14
|
-
const bigIntify = (b) => BigInt(b.toString());
|
|
15
|
-
async function getOnChainState(multiContract, poolConfigs, vatAddress, blockNumber) {
|
|
16
|
-
const callData = poolConfigs
|
|
17
|
-
.map(c => [
|
|
18
|
-
{
|
|
19
|
-
target: c.psmAddress,
|
|
20
|
-
callData: psmInterface.encodeFunctionData('tin', []),
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
target: c.psmAddress,
|
|
24
|
-
callData: psmInterface.encodeFunctionData('tout', []),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
target: vatAddress,
|
|
28
|
-
callData: vatInterface.encodeFunctionData('ilks', [c.identifier]),
|
|
29
|
-
},
|
|
30
|
-
])
|
|
31
|
-
.flat();
|
|
32
|
-
const res = await multiContract.methods
|
|
33
|
-
.aggregate(callData)
|
|
34
|
-
.call({}, blockNumber);
|
|
35
|
-
let i = 0;
|
|
36
|
-
return poolConfigs.map(c => {
|
|
37
|
-
const tin = bigIntify(psmInterface.decodeFunctionResult('tin', res.returnData[i++])[0]);
|
|
38
|
-
const tout = bigIntify(psmInterface.decodeFunctionResult('tout', res.returnData[i++])[0]);
|
|
39
|
-
const ilks = vatInterface.decodeFunctionResult('ilks', res.returnData[i++]);
|
|
40
|
-
const Art = bigIntify(ilks.Art);
|
|
41
|
-
const line = bigIntify(ilks.line);
|
|
42
|
-
const rate = bigIntify(ilks.rate);
|
|
43
|
-
return {
|
|
44
|
-
tin,
|
|
45
|
-
tout,
|
|
46
|
-
Art,
|
|
47
|
-
line,
|
|
48
|
-
rate,
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
class MakerPsmEventPool extends stateful_event_subscriber_1.StatefulEventSubscriber {
|
|
53
|
-
network;
|
|
54
|
-
dexHelper;
|
|
55
|
-
poolConfig;
|
|
56
|
-
vatAddress;
|
|
57
|
-
handlers = {};
|
|
58
|
-
logDecoder;
|
|
59
|
-
to18ConversionFactor;
|
|
60
|
-
bytes32Tout = '0x746f757400000000000000000000000000000000000000000000000000000000'; // bytes32('tout')
|
|
61
|
-
bytes32Tin = '0x74696e0000000000000000000000000000000000000000000000000000000000'; // bytes32('tin')
|
|
62
|
-
constructor(parentName, network, dexHelper, logger, poolConfig, vatAddress) {
|
|
63
|
-
super(parentName, poolConfig.identifier, dexHelper, logger);
|
|
64
|
-
this.network = network;
|
|
65
|
-
this.dexHelper = dexHelper;
|
|
66
|
-
this.poolConfig = poolConfig;
|
|
67
|
-
this.vatAddress = vatAddress;
|
|
68
|
-
this.logDecoder = (log) => psmInterface.parseLog(log);
|
|
69
|
-
this.addressesSubscribed = [poolConfig.psmAddress];
|
|
70
|
-
this.to18ConversionFactor = (0, utils_1.getBigIntPow)(18 - poolConfig.gem.decimals);
|
|
71
|
-
// Add handlers
|
|
72
|
-
this.handlers['File'] = this.handleFile.bind(this);
|
|
73
|
-
this.handlers['SellGem'] = this.handleSellGem.bind(this);
|
|
74
|
-
this.handlers['BuyGem'] = this.handleBuyGem.bind(this);
|
|
75
|
-
}
|
|
76
|
-
handleFile(event, pool, log) {
|
|
77
|
-
if (event.args.what === this.bytes32Tin) {
|
|
78
|
-
pool.tin = bigIntify(event.args.data);
|
|
79
|
-
}
|
|
80
|
-
else if (event.args.what === this.bytes32Tout) {
|
|
81
|
-
pool.tout = bigIntify(event.args.data);
|
|
82
|
-
}
|
|
83
|
-
return pool;
|
|
84
|
-
}
|
|
85
|
-
handleSellGem(event, pool, log) {
|
|
86
|
-
pool.Art += bigIntify(event.args.value) * this.to18ConversionFactor;
|
|
87
|
-
return pool;
|
|
88
|
-
}
|
|
89
|
-
handleBuyGem(event, pool, log) {
|
|
90
|
-
pool.Art -= bigIntify(event.args.value) * this.to18ConversionFactor;
|
|
91
|
-
return pool;
|
|
92
|
-
}
|
|
93
|
-
getIdentifier() {
|
|
94
|
-
return `${this.parentName}_${this.poolConfig.psmAddress}`.toLowerCase();
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* The function is called every time any of the subscribed
|
|
98
|
-
* addresses release log. The function accepts the current
|
|
99
|
-
* state, updates the state according to the log, and returns
|
|
100
|
-
* the updated state.
|
|
101
|
-
* @param state - Current state of event subscriber
|
|
102
|
-
* @param log - Log released by one of the subscribed addresses
|
|
103
|
-
* @returns Updates state of the event subscriber after the log
|
|
104
|
-
*/
|
|
105
|
-
processLog(state, log) {
|
|
106
|
-
try {
|
|
107
|
-
const event = this.logDecoder(log);
|
|
108
|
-
if (event.name in this.handlers) {
|
|
109
|
-
return this.handlers[event.name](event, state, log);
|
|
110
|
-
}
|
|
111
|
-
return state;
|
|
112
|
-
}
|
|
113
|
-
catch (e) {
|
|
114
|
-
this.logger.error(`Error_${this.parentName}_processLog could not parse the log with topic ${log.topics}:`, e);
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* The function generates state using on-chain calls. This
|
|
120
|
-
* function is called to regenerate state if the event based
|
|
121
|
-
* system fails to fetch events and the local state is no
|
|
122
|
-
* more correct.
|
|
123
|
-
* @param blockNumber - Blocknumber for which the state should
|
|
124
|
-
* should be generated
|
|
125
|
-
* @returns state of the event subscriber at blocknumber
|
|
126
|
-
*/
|
|
127
|
-
async generateState(blockNumber) {
|
|
128
|
-
return (await getOnChainState(this.dexHelper.multiContract, [this.poolConfig], this.vatAddress, blockNumber))[0];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
exports.MakerPsmEventPool = MakerPsmEventPool;
|
|
132
|
-
//# sourceMappingURL=maker-psm-event-pool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"maker-psm-event-pool.js","sourceRoot":"","sources":["../../../src/dex/maker-psm/maker-psm-event-pool.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA+C;AAI/C,+EAA0E;AAC1E,uCAA2C;AAG3C,4EAAkD;AAClD,4EAAkD;AAElD,MAAM,YAAY,GAAG,IAAI,eAAS,CAAC,kBAAM,CAAC,CAAC;AAC3C,MAAM,YAAY,GAAG,IAAI,eAAS,CAAC,kBAAM,CAAC,CAAC;AAE3C,MAAM,SAAS,GAAG,CAAC,CAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEnD,KAAK,UAAU,eAAe,CAC5B,aAAuB,EACvB,WAAyB,EACzB,UAAmB,EACnB,WAA8B;IAE9B,MAAM,QAAQ,GAAG,WAAW;SACzB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACR;YACE,MAAM,EAAE,CAAC,CAAC,UAAU;YACpB,QAAQ,EAAE,YAAY,CAAC,kBAAkB,CAAC,KAAK,EAAE,EAAE,CAAC;SACrD;QACD;YACE,MAAM,EAAE,CAAC,CAAC,UAAU;YACpB,QAAQ,EAAE,YAAY,CAAC,kBAAkB,CAAC,MAAM,EAAE,EAAE,CAAC;SACtD;QACD;YACE,MAAM,EAAE,UAAU;YAClB,QAAQ,EAAE,YAAY,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;SAClE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AM,eAAe,CACnB,IAAI,CAAC,SAAS,CAAC,aAAa,EAC5B,CAAC,IAAI,CAAC,UAAU,CAAC,EACjB,IAAI,CAAC,UAAU,EACf,WAAW,CACZ,CACF,CAAC,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAvGD,8CAuGC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Interface } from '@ethersproject/abi';
|
|
2
|
-
import { DeepReadonly } from 'ts-essentials';
|
|
3
|
-
import { Log, Logger } from '../../types';
|
|
4
|
-
import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
|
|
5
|
-
import { IDexHelper } from '../../dex-helper/idex-helper';
|
|
6
|
-
import { MiroMigratorState } from './types';
|
|
7
|
-
export declare class MiroMigratorEventState extends StatefulEventSubscriber<MiroMigratorState> {
|
|
8
|
-
readonly parentName: string;
|
|
9
|
-
protected network: number;
|
|
10
|
-
protected dexHelper: IDexHelper;
|
|
11
|
-
protected migratorAddress: string;
|
|
12
|
-
protected xyzAddress: string;
|
|
13
|
-
protected transferTopic: string;
|
|
14
|
-
protected migratorInterface: Interface;
|
|
15
|
-
protected xyzInterface: Interface;
|
|
16
|
-
handlers: {
|
|
17
|
-
[event: string]: (event: any, state: DeepReadonly<MiroMigratorState>, log: Readonly<Log>) => DeepReadonly<MiroMigratorState> | null;
|
|
18
|
-
};
|
|
19
|
-
logDecoder: (log: Log) => any;
|
|
20
|
-
addressesSubscribed: string[];
|
|
21
|
-
constructor(parentName: string, network: number, dexHelper: IDexHelper, logger: Logger, migratorAddress: string, xyzAddress: string, transferTopic: string, migratorInterface?: Interface, xyzInterface?: Interface);
|
|
22
|
-
protected processLog(state: DeepReadonly<MiroMigratorState>, log: Readonly<Log>): Promise<DeepReadonly<MiroMigratorState> | null>;
|
|
23
|
-
generateState(blockNumber?: number | 'latest'): Promise<DeepReadonly<MiroMigratorState>>;
|
|
24
|
-
getOrGenerateState(blockNumber: number): Promise<MiroMigratorState>;
|
|
25
|
-
handleTransferTo(event: any, state: DeepReadonly<MiroMigratorState>, log: Readonly<Log>): Promise<DeepReadonly<MiroMigratorState>>;
|
|
26
|
-
handleTransferFrom(event: any, state: DeepReadonly<MiroMigratorState>, log: Readonly<Log>): Promise<DeepReadonly<MiroMigratorState>>;
|
|
27
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
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.MiroMigratorEventState = void 0;
|
|
7
|
-
const abi_1 = require("@ethersproject/abi");
|
|
8
|
-
const utils_1 = require("../../utils");
|
|
9
|
-
const stateful_event_subscriber_1 = require("../../stateful-event-subscriber");
|
|
10
|
-
const decoders_1 = require("../../lib/decoders");
|
|
11
|
-
const MiroMigrator_abi_json_1 = __importDefault(require("../../abi/miro-migrator/MiroMigrator.abi.json"));
|
|
12
|
-
const erc20_json_1 = __importDefault(require("../../abi/erc20.json"));
|
|
13
|
-
class MiroMigratorEventState extends stateful_event_subscriber_1.StatefulEventSubscriber {
|
|
14
|
-
parentName;
|
|
15
|
-
network;
|
|
16
|
-
dexHelper;
|
|
17
|
-
migratorAddress;
|
|
18
|
-
xyzAddress;
|
|
19
|
-
transferTopic;
|
|
20
|
-
migratorInterface;
|
|
21
|
-
xyzInterface;
|
|
22
|
-
handlers = {};
|
|
23
|
-
logDecoder;
|
|
24
|
-
addressesSubscribed;
|
|
25
|
-
constructor(parentName, network, dexHelper, logger, migratorAddress, xyzAddress, transferTopic, migratorInterface = new abi_1.Interface(MiroMigrator_abi_json_1.default), xyzInterface = new abi_1.Interface(erc20_json_1.default)) {
|
|
26
|
-
super(parentName, 'state', dexHelper, logger);
|
|
27
|
-
this.parentName = parentName;
|
|
28
|
-
this.network = network;
|
|
29
|
-
this.dexHelper = dexHelper;
|
|
30
|
-
this.migratorAddress = migratorAddress;
|
|
31
|
-
this.xyzAddress = xyzAddress;
|
|
32
|
-
this.transferTopic = transferTopic;
|
|
33
|
-
this.migratorInterface = migratorInterface;
|
|
34
|
-
this.xyzInterface = xyzInterface;
|
|
35
|
-
this.logDecoder = (log) => this.migratorInterface.parseLog(log);
|
|
36
|
-
this.addressesSubscribed = [xyzAddress];
|
|
37
|
-
}
|
|
38
|
-
async processLog(state, log) {
|
|
39
|
-
try {
|
|
40
|
-
const event = this.logDecoder(log);
|
|
41
|
-
if (log.topics[0] === this.transferTopic &&
|
|
42
|
-
event.args.to.toLowerCase() === this.migratorAddress.toLowerCase()) {
|
|
43
|
-
return this.handleTransferTo(event, state, log);
|
|
44
|
-
}
|
|
45
|
-
if (log.topics[0] === this.transferTopic &&
|
|
46
|
-
event.args.from.toLowerCase() === this.migratorAddress.toLowerCase()) {
|
|
47
|
-
return this.handleTransferFrom(event, state, log);
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
(0, utils_1.catchParseLogError)(e, this.logger);
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
async generateState(blockNumber = 'latest') {
|
|
57
|
-
const calls = [
|
|
58
|
-
{
|
|
59
|
-
target: this.xyzAddress,
|
|
60
|
-
callData: this.xyzInterface.encodeFunctionData('balanceOf', [
|
|
61
|
-
this.migratorAddress,
|
|
62
|
-
]),
|
|
63
|
-
decodeFunction: decoders_1.uint256ToBigInt,
|
|
64
|
-
},
|
|
65
|
-
];
|
|
66
|
-
const [balance] = await this.dexHelper.multiWrapper.tryAggregate(true, calls, blockNumber);
|
|
67
|
-
return { balance: balance.returnData };
|
|
68
|
-
}
|
|
69
|
-
async getOrGenerateState(blockNumber) {
|
|
70
|
-
let state = this.getState(blockNumber);
|
|
71
|
-
if (!state) {
|
|
72
|
-
state = await this.generateState(blockNumber);
|
|
73
|
-
this.setState(state, blockNumber);
|
|
74
|
-
}
|
|
75
|
-
return state;
|
|
76
|
-
}
|
|
77
|
-
async handleTransferTo(event, state, log) {
|
|
78
|
-
return {
|
|
79
|
-
balance: state.balance + BigInt(event.args.value),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
async handleTransferFrom(event, state, log) {
|
|
83
|
-
return {
|
|
84
|
-
balance: state.balance - BigInt(event.args.value),
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
exports.MiroMigratorEventState = MiroMigratorEventState;
|
|
89
|
-
//# sourceMappingURL=miro-migrator-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"miro-migrator-state.js","sourceRoot":"","sources":["../../../src/dex/miro-migrator/miro-migrator-state.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA+C;AAG/C,uCAAiD;AACjD,+EAA0E;AAG1E,iDAAqD;AACrD,0GAA4E;AAC5E,sEAA4C;AAE5C,MAAa,sBAAuB,SAAQ,mDAA0C;IAczE;IACC;IACA;IAEA;IACA;IACA;IACA;IACA;IArBZ,QAAQ,GAMJ,EAAE,CAAC;IAEP,UAAU,CAAoB;IAE9B,mBAAmB,CAAW;IAE9B,YACW,UAAkB,EACjB,OAAe,EACf,SAAqB,EAC/B,MAAc,EACJ,eAAuB,EACvB,UAAkB,EAClB,aAAqB,EACrB,oBAA+B,IAAI,eAAS,CAAC,+BAAe,CAAC,EAC7D,eAA0B,IAAI,eAAS,CAAC,oBAAQ,CAAC;QAE3D,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAVrC,eAAU,GAAV,UAAU,CAAQ;QACjB,YAAO,GAAP,OAAO,CAAQ;QACf,cAAS,GAAT,SAAS,CAAY;QAErB,oBAAe,GAAf,eAAe,CAAQ;QACvB,eAAU,GAAV,UAAU,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAQ;QACrB,sBAAiB,GAAjB,iBAAiB,CAA4C;QAC7D,iBAAY,GA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,WAAW,EAAE;oBAC1D,IAAI,CAAC,eAAe;iBACrB,CAAC;gBACF,cAAc,EAAE,0BAAe;aAChC;SACF,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,CAC9D,IAAI,EACJ,KAAK,EACL,WAAW,CACZ,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,WAAmB;QAC1C,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,KAAK,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;YAC9C,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,KAAU,EACV,KAAsC,EACtC,GAAkB;QAElB,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SAClD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,KAAU,EACV,KAAsC,EACtC,GAAkB;QAElB,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SAClD,CAAC;IACJ,CAAC;CACF;AA3GD,wDA2GC"}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StabullConfig = void 0;
|
|
4
|
-
const constants_1 = require("../../constants");
|
|
5
|
-
exports.StabullConfig = {
|
|
6
|
-
Stabull: {
|
|
7
|
-
[constants_1.Network.MAINNET]: {
|
|
8
|
-
router: '0x871af97122d08890193e8d6465015f6d9e2889b2',
|
|
9
|
-
quoteCurrency: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
10
|
-
pools: {
|
|
11
|
-
'0xe37d763c7c4cdd9a8f085f7db70139a0843529f3': {
|
|
12
|
-
tokens: [
|
|
13
|
-
{
|
|
14
|
-
address: '0xda446fad08277b4d2591536f204e018f32b6831c',
|
|
15
|
-
decimals: 18,
|
|
16
|
-
}, // NZDS
|
|
17
|
-
{
|
|
18
|
-
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
19
|
-
decimals: 6,
|
|
20
|
-
}, // USDC
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
'0x865040f92ac6cca1b9683c03d843799d8e6d1282': {
|
|
24
|
-
tokens: [
|
|
25
|
-
{
|
|
26
|
-
address: '0xdb25f211ab05b1c97d595516f45794528a807ad8',
|
|
27
|
-
decimals: 2,
|
|
28
|
-
}, // EURS
|
|
29
|
-
{
|
|
30
|
-
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
31
|
-
decimals: 6,
|
|
32
|
-
}, // USDC
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
'0xc1a195fdb17da5771d470a232545550a7d264809': {
|
|
36
|
-
tokens: [
|
|
37
|
-
{
|
|
38
|
-
address: '0x2c537e5624e4af88a7ae4060c022609376c8d0eb',
|
|
39
|
-
decimals: 6,
|
|
40
|
-
}, // TRYB
|
|
41
|
-
{
|
|
42
|
-
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
43
|
-
decimals: 6,
|
|
44
|
-
}, // USDC
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
'0x402878106b88b41fad1200b47e998c8effd0d887': {
|
|
48
|
-
tokens: [
|
|
49
|
-
{
|
|
50
|
-
address: '0x86b4dbe5d203e634a12364c0e428fa242a3fba98',
|
|
51
|
-
decimals: 18,
|
|
52
|
-
}, // 1GBP
|
|
53
|
-
{
|
|
54
|
-
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
55
|
-
decimals: 6,
|
|
56
|
-
}, // USDC
|
|
57
|
-
],
|
|
58
|
-
},
|
|
59
|
-
'0x01e4013c478d7f02112c3cf178f2771c842edbd0': {
|
|
60
|
-
tokens: [
|
|
61
|
-
{
|
|
62
|
-
address: '0xc08512927d12348f6620a698105e1baac6ecd911',
|
|
63
|
-
decimals: 6,
|
|
64
|
-
}, // GYEN
|
|
65
|
-
{
|
|
66
|
-
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
|
|
67
|
-
decimals: 6,
|
|
68
|
-
}, // USDC
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
[constants_1.Network.POLYGON]: {
|
|
74
|
-
router: '0x0c1f53e7b5a770f4c0d4bef139f752eeb08de88d',
|
|
75
|
-
quoteCurrency: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
76
|
-
pools: {
|
|
77
|
-
'0xdcb7efaca996fe2985138bf31b647efcd1d0901a': {
|
|
78
|
-
tokens: [
|
|
79
|
-
{
|
|
80
|
-
address: '0xfbbe4b730e1e77d02dc40fedf9438e2802eab3b5',
|
|
81
|
-
decimals: 18,
|
|
82
|
-
}, // NZDS
|
|
83
|
-
{
|
|
84
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
85
|
-
decimals: 6,
|
|
86
|
-
}, // USDC
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
'0xf80b3a8977d34a443a836a380b2fce69a1a4e819': {
|
|
90
|
-
tokens: [
|
|
91
|
-
{
|
|
92
|
-
address: '0xe111178a87a3bff0c8d18decba5798827539ae99',
|
|
93
|
-
decimals: 2,
|
|
94
|
-
}, // EURS
|
|
95
|
-
{
|
|
96
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
97
|
-
decimals: 6,
|
|
98
|
-
}, // USDC
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
'0x55bdf7f0223e8b1d509141a8d852dd86b3553d59': {
|
|
102
|
-
tokens: [
|
|
103
|
-
{
|
|
104
|
-
address: '0x4fb71290ac171e1d144f7221d882becac7196eb5',
|
|
105
|
-
decimals: 6,
|
|
106
|
-
}, // TRYB
|
|
107
|
-
{
|
|
108
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
109
|
-
decimals: 6,
|
|
110
|
-
}, // USDC
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
'0x509aacb7746166252ecb0d62bfba097cc9731e20': {
|
|
114
|
-
tokens: [
|
|
115
|
-
{
|
|
116
|
-
address: '0xdc3326e71d45186f113a2f448984ca0e8d201995',
|
|
117
|
-
decimals: 6,
|
|
118
|
-
}, // XSGD
|
|
119
|
-
{
|
|
120
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
121
|
-
decimals: 6,
|
|
122
|
-
}, // USDC
|
|
123
|
-
],
|
|
124
|
-
},
|
|
125
|
-
'0xce0abd182d2cf5844f2a0cb52cfcc55d4ff4fcba': {
|
|
126
|
-
tokens: [
|
|
127
|
-
{
|
|
128
|
-
address: '0x4ed141110f6eeeaba9a1df36d8c26f684d2475dc',
|
|
129
|
-
decimals: 4,
|
|
130
|
-
}, // BRZ
|
|
131
|
-
{
|
|
132
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
133
|
-
decimals: 6,
|
|
134
|
-
}, // USDC
|
|
135
|
-
],
|
|
136
|
-
},
|
|
137
|
-
'0x3d4436ba3ae7e0e6361c83ab940ea779cd598206': {
|
|
138
|
-
tokens: [
|
|
139
|
-
{
|
|
140
|
-
address: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
|
|
141
|
-
decimals: 6,
|
|
142
|
-
}, // USDT
|
|
143
|
-
{
|
|
144
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
145
|
-
decimals: 6,
|
|
146
|
-
}, // USDC
|
|
147
|
-
],
|
|
148
|
-
},
|
|
149
|
-
'0xa52508b1822ca9261b33213b233694f846abd0ed': {
|
|
150
|
-
tokens: [
|
|
151
|
-
{
|
|
152
|
-
address: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
|
|
153
|
-
decimals: 18,
|
|
154
|
-
}, // DAI
|
|
155
|
-
{
|
|
156
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
157
|
-
decimals: 6,
|
|
158
|
-
}, // USDC
|
|
159
|
-
],
|
|
160
|
-
},
|
|
161
|
-
'0x1233003461f654cf1c0d7db19e753badef05a87f': {
|
|
162
|
-
tokens: [
|
|
163
|
-
{
|
|
164
|
-
address: '0x87a25dc121db52369f4a9971f664ae5e372cf69a',
|
|
165
|
-
decimals: 6,
|
|
166
|
-
}, // PHPC
|
|
167
|
-
{
|
|
168
|
-
address: '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359',
|
|
169
|
-
decimals: 6,
|
|
170
|
-
}, // USDC
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
};
|
|
177
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dex/stabull/config.ts"],"names":[],"mappings":";;;AAEA,+CAA0C;AAE7B,QAAA,aAAa,GAA4B;IACpD,OAAO,EAAE;QACP,CAAC,mBAAO,CAAC,OAAO,CAAC,EAAE;YACjB,MAAM,EAAE,4CAA4C;YACpD,aAAa,EAAE,4CAA4C;YAC3D,KAAK,EAAE;gBACL,4CAA4C,EAAE;oBAC5C,MAAM,EAAE;wBACN;4BACE,OAAO,EAAE,4CAA4C;4BACrD,QAAQ,EAAE,EAAE;yBACb,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