impermax-sdk 2.1.250 → 2.1.252
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/lib/index.d.ts +22 -5
- package/lib/index.js +56 -4
- package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlp.d.ts +1 -1
- package/lib/offchain/lendingPool/nftlp/offchainNftlp.d.ts +2 -0
- package/lib/offchain/lendingPool/nftlp/offchainNftlpUniswapV3.d.ts +2 -0
- package/lib/offchain/lendingPool/nftlp/offchainNftlpUniswapV3.js +4 -0
- package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlp.d.ts +1 -1
- package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlp.d.ts +2 -0
- package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlpUniswapV3.d.ts +2 -0
- package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlpUniswapV3.js +4 -0
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlp.d.ts +3 -2
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlp.js +1 -0
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpUniswapV3.d.ts +0 -1
- package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpUniswapV3.js +3 -5
- package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateralV2.d.ts +1 -1
- package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateralV2.js +4 -4
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -25,19 +25,19 @@ import { OffchainBorrowable, OffchainCollateral } from './offchain/lendingPool';
|
|
|
25
25
|
import OffchainConfigManager, { OffchainPairConfig, OffchainProposal } from './offchain/configManager';
|
|
26
26
|
import OffchainAccountLendingPool, { OffchainAccountBorrowable, OffchainAccountCollateral, OffchainLeveragedPosition, OffchainAccountCollateralV2 } from './offchain/account/lendingPool';
|
|
27
27
|
import { OffchainAccountVault, OffchainAccountPoolToken, OffchainMultichainAccount } from './offchain/account';
|
|
28
|
-
import OnchainLendingPool, { OnchainBorrowable, OnchainCollateral } from './onchain/impermaxFactory/lendingPool';
|
|
28
|
+
import OnchainLendingPool, { OnchainBorrowable, OnchainBorrowableV2, OnchainBorrowableV3, OnchainCollateral, OnchainCollateralV2, OnchainCollateralV3, OnchainLendingPoolV2, OnchainLendingPoolV3 } from './onchain/impermaxFactory/lendingPool';
|
|
29
29
|
import OnchainConfigManager, { OnchainPairConfig, OnchainProposal } from './onchain/configManager';
|
|
30
30
|
import { OnchainAccountLendingPool, OnchainAccountLendingVault, OnchainAccountPoolToken } from './onchain/account';
|
|
31
|
-
import { OnchainAccountBorrowable, OnchainAccountCollateral } from './onchain/account/lendingPool';
|
|
31
|
+
import { OnchainAccountBorrowable, OnchainAccountBorrowableV2, OnchainAccountBorrowableV3, OnchainAccountCollateral, OnchainAccountCollateralV2, OnchainAccountCollateralV3 } from './onchain/account/lendingPool';
|
|
32
32
|
import { OnchainInteractionsLendingPool, OnchainInteractionsLendingVault, OnchainInteractionsPoolToken, OnchainInteractionsConfigManager } from './onchain/interactions';
|
|
33
|
-
import { OnchainInteractionsBorrowable, OnchainInteractionsCollateral, OnchainInteractionsLendingPoolV3 } from './onchain/interactions/lendingPool';
|
|
33
|
+
import { OnchainInteractionsBorrowable, OnchainInteractionsBorrowableV2, OnchainInteractionsBorrowableV3, OnchainInteractionsCollateral, OnchainInteractionsCollateralV2, OnchainInteractionsCollateralV3, OnchainInteractionsLendingPoolV2, OnchainInteractionsLendingPoolV3 } from './onchain/interactions/lendingPool';
|
|
34
34
|
import { LENDING_VAULT_WATCHER } from './config/contracts/lending-vault-watcher';
|
|
35
35
|
import OffchainVault, { OffchainLendingVault, OffchainLeveragedVault, OffchainHedgedVault } from './offchain/vault';
|
|
36
36
|
import { SortDirection, VaultListOrderBy, VaultListParams, LendingPoolListParams, LendingPoolListOrderBy } from "./offchain/offchainMultichain";
|
|
37
37
|
import { VaultRisk } from "./offchain/vault/offchainVault";
|
|
38
38
|
import { LendingPoolVersion } from "./offchain/lendingPool/offchainLendingPool";
|
|
39
39
|
import { PositionType, AccountPosition } from "./offchain/account/offchainMultichainAccount";
|
|
40
|
-
import { OnchainInteractionsNftlpUniswapV3 } from './onchain/interactions/lendingPool/nftlp';
|
|
40
|
+
import OnchainInteractionsNftlp, { OnchainInteractionsNftlpUniswapV3 } from './onchain/interactions/lendingPool/nftlp';
|
|
41
41
|
import OnchainAccountNftlpUniswapV3 from './onchain/account/lendingPool/nftlp/onchainAccountNftlpUniswapV3';
|
|
42
42
|
import OnchainAccountLendingPoolV3 from './onchain/account/lendingPool/onchainAccountLendingPoolV3';
|
|
43
43
|
import OnchainAccountLendingPoolV2 from './onchain/account/lendingPool/onchainAccountLendingPoolV2';
|
|
@@ -48,4 +48,21 @@ import { MAX_TICK, MIN_TICK, formatPriceSqrtX96, uniV3TickToPrice } from "./util
|
|
|
48
48
|
import UniswapV3Position from './utils/position/uniswapV3';
|
|
49
49
|
import UniswapV2Position from './utils/position/uniswapV2';
|
|
50
50
|
import Position from './utils/position/interface';
|
|
51
|
-
|
|
51
|
+
import OffchainLendingPoolV2 from './offchain/lendingPool/offchainLendingPoolV2';
|
|
52
|
+
import OffchainBorrowableV2 from './offchain/lendingPool/offchainBorrowableV2';
|
|
53
|
+
import OffchainCollateralV2 from './offchain/lendingPool/offchainCollateralV2';
|
|
54
|
+
import OffchainBorrowableV3 from './offchain/lendingPool/offchainBorrowableV3';
|
|
55
|
+
import OffchainLendingPoolV3 from './offchain/lendingPool/offchainLendingPoolV3';
|
|
56
|
+
import OffchainNftlp, { OffchainNftlpUniswapV3 } from './offchain/lendingPool/nftlp';
|
|
57
|
+
import OffchainCollateralV3 from './offchain/lendingPool/offchainCollateralV3';
|
|
58
|
+
import OffchainAccountLendingPoolV2 from './offchain/account/lendingPool/offchainAccountLendingPoolV2';
|
|
59
|
+
import OffchainAccountBorrowableV2 from './offchain/account/lendingPool/offchainAccountBorrowableV2';
|
|
60
|
+
import OffchainAccountCollateralV3 from './offchain/account/lendingPool/offchainAccountCollateralV3';
|
|
61
|
+
import OffchainAccountNftlp from './offchain/account/lendingPool/nftlp/offchainAccountNftlp';
|
|
62
|
+
import { OnchainImpermaxFactoryV3 } from './onchain/impermaxFactory';
|
|
63
|
+
import { OnchainImpermaxFactoryV2 } from './onchain/impermaxFactory';
|
|
64
|
+
import { OnchainNftlpUniswapV3 } from './onchain/impermaxFactory/lendingPool/nftlp';
|
|
65
|
+
import OnchainNftlp from './onchain/impermaxFactory/lendingPool/nftlp';
|
|
66
|
+
import OnchainAccountNftlp from './onchain/account/lendingPool/nftlp';
|
|
67
|
+
import OffchainAccountBorrowableV3 from './offchain/account/lendingPool/offchainAccountBorrowableV3';
|
|
68
|
+
export { offchain, OffchainMultichain, Offchain, OffchainPoolToken, OffchainLendingPool, OffchainCollateral, OffchainBorrowable, OffchainLendingPoolV2, OffchainCollateralV2, OffchainBorrowableV2, OffchainLendingPoolV3, OffchainCollateralV3, OffchainBorrowableV3, OffchainNftlp, OffchainNftlpUniswapV3, OffchainVault, OffchainLeveragedVault, OffchainLendingVault, OffchainHedgedVault, OffchainConfigManager, OffchainPairConfig, OffchainProposal, OffchainMultichainAccount, OffchainAccount, OffchainAccountPoolToken, OffchainAccountLendingPool, OffchainAccountCollateral, OffchainAccountBorrowable, OffchainAccountLendingPoolV2, OffchainAccountCollateralV2, OffchainAccountBorrowableV2, OffchainAccountLendingPoolV3, OffchainAccountCollateralV3, OffchainAccountBorrowableV3, OffchainAccountNftlp, OffchainAccountNftlpUniswapV3, OffchainLeveragedPosition, OffchainAccountVault, OffchainPriceHelper, OffchainSolidexHelper, PoolTokenData, BorrowableData, CollateralData, BorrowablePastData, TokenData, RewardData, PairData, FarmingPoolData, LendingPoolPastData, LendingPoolData, CollateralPosition, SupplyPosition, BorrowPosition, UserData, TvlData, XimxData, LendingVaultData, VaultPosition, PairConfigData, ProposalData, ProposalMetadata, VaultRisk, VaultType, onchain, Onchain, OnchainImpermaxFactory, OnchainImpermaxFactoryV2, OnchainImpermaxFactoryV3, OnchainPoolToken, OnchainLendingPool, OnchainBorrowable, OnchainCollateral, OnchainLendingPoolV2, OnchainBorrowableV2, OnchainCollateralV2, OnchainLendingPoolV3, OnchainBorrowableV3, OnchainCollateralV3, OnchainNftlp, OnchainNftlpUniswapV3, OnchainLendingVault, OnchainConfigManager, OnchainProposal, OnchainPairConfig, OnchainAccount, OnchainAccountPoolToken, OnchainAccountLendingPool, OnchainAccountBorrowable, OnchainAccountCollateral, OnchainAccountLendingPoolV2, OnchainAccountBorrowableV2, OnchainAccountCollateralV2, OnchainAccountLendingPoolV3, OnchainAccountBorrowableV3, OnchainAccountCollateralV3, OnchainAccountNftlp, OnchainAccountNftlpUniswapV3, OnchainAccountLendingVault, OnchainContractsHelper, OnchainInteractions, OnchainInteractionsPoolToken, OnchainInteractionsLendingPool, OnchainInteractionsCollateral, OnchainInteractionsBorrowable, OnchainInteractionsLendingPoolV2, OnchainInteractionsCollateralV2, OnchainInteractionsBorrowableV2, OnchainInteractionsLendingPoolV3, OnchainInteractionsCollateralV3, OnchainInteractionsBorrowableV3, OnchainInteractionsNftlp, OnchainInteractionsNftlpUniswapV3, OnchainInteractionsLendingVault, OnchainInteractionsConfigManager, Contract, ApprovalType, PermitData, OnchainConfig, Changes, NO_CHANGES, Values, AirdropData, PendingRewardUI, CollateralConfig, BorrowableV2Config, BorrowableV3Config, PairConfig, CLAIM_AGGREGATOR, IMPERMAX_CHEF, IMX, IMPERMAX_FACTORY, getNetworkFactories, getFactoryByAddress, LENDING_VAULT_WATCHER, MERKLE_DISTRIBUTOR_IBEX, MERKLE_DISTRIBUTOR_IBEX_2, MERKLE_DISTRIBUTOR_ETH, ROUTER, SIMPLE_UNISWAP_ORACLE, WETH, MERKLE_URL_ETH, MERKLE_URL_IBEX, MERKLE_URL_IBEX_2, hrAmms, AMM_FACTORY, getAmmByFactory, AMM_SUBGRAPH_URLS, ADD_LIQUIDITY_URLS, AMM_LP_FEE, DEBANK_IDS, ETH_SYMBOL, ETH_NAME, SOLIDEX_FACTORIES, BORROW_FEE_FACTORIES, OLD_KINK_MULTIPLIER_FACTORIES, LIQUIDATION_FEE_FACTORIES, V2_FACTORIES, Farms, hrFarms, FarmIndex, STAKED_LP_FACTORY, getFarmByStakedLPFactory, NOT_SYNCED, DEADLINE, ZERO, APPROVE_AMOUNT, IMPERMAX_SUBGRAPH_URL, IMPERMAX_CHEF_SUBGRAPH_URL, BLOCKS_SUBGRAPH_URL, XIMX_SUBGRAPH_URL, Networks, Factory, Extension, PoolTokenType, Amms, Address, NetworkIndex, FactoryIndex, AddressIndex, NetworkFactoryIndex, LendingPoolIndex, AmmIndex, DistributorDetails, ProposalState, WhitelistState, VaultListOrderBy, VaultListParams, LendingPoolListOrderBy, LendingPoolListParams, SortDirection, LendingPoolVersion, PositionType, AccountPosition, PermitType, Permits, Permit, Borrowable, decimalToBalance, MAX_TICK, MIN_TICK, formatPriceSqrtX96, uniV3TickToPrice, isV3Factory, UniswapV3Position, UniswapV2Position, Position, };
|
package/lib/index.js
CHANGED
|
@@ -26,9 +26,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
29
|
+
exports.OnchainBorrowable = exports.OnchainLendingPool = exports.OnchainPoolToken = exports.OnchainImpermaxFactoryV3 = exports.OnchainImpermaxFactoryV2 = exports.OnchainImpermaxFactory = exports.Onchain = exports.onchain = exports.VaultType = exports.VaultRisk = exports.OffchainSolidexHelper = exports.OffchainPriceHelper = exports.OffchainAccountVault = exports.OffchainLeveragedPosition = exports.OffchainAccountNftlpUniswapV3 = exports.OffchainAccountNftlp = exports.OffchainAccountBorrowableV3 = exports.OffchainAccountCollateralV3 = exports.OffchainAccountLendingPoolV3 = exports.OffchainAccountBorrowableV2 = exports.OffchainAccountCollateralV2 = exports.OffchainAccountLendingPoolV2 = exports.OffchainAccountBorrowable = exports.OffchainAccountCollateral = exports.OffchainAccountLendingPool = exports.OffchainAccountPoolToken = exports.OffchainAccount = exports.OffchainMultichainAccount = exports.OffchainProposal = exports.OffchainPairConfig = exports.OffchainConfigManager = exports.OffchainHedgedVault = exports.OffchainLendingVault = exports.OffchainLeveragedVault = exports.OffchainVault = exports.OffchainNftlpUniswapV3 = exports.OffchainNftlp = exports.OffchainBorrowableV3 = exports.OffchainCollateralV3 = exports.OffchainLendingPoolV3 = exports.OffchainBorrowableV2 = exports.OffchainCollateralV2 = exports.OffchainLendingPoolV2 = exports.OffchainBorrowable = exports.OffchainCollateral = exports.OffchainLendingPool = exports.OffchainPoolToken = exports.Offchain = exports.OffchainMultichain = exports.offchain = void 0;
|
|
30
|
+
exports.getNetworkFactories = exports.IMPERMAX_FACTORY = exports.IMX = exports.IMPERMAX_CHEF = exports.CLAIM_AGGREGATOR = exports.NO_CHANGES = exports.ApprovalType = exports.OnchainInteractionsConfigManager = exports.OnchainInteractionsLendingVault = exports.OnchainInteractionsNftlpUniswapV3 = exports.OnchainInteractionsNftlp = exports.OnchainInteractionsBorrowableV3 = exports.OnchainInteractionsCollateralV3 = exports.OnchainInteractionsLendingPoolV3 = exports.OnchainInteractionsBorrowableV2 = exports.OnchainInteractionsCollateralV2 = exports.OnchainInteractionsLendingPoolV2 = exports.OnchainInteractionsBorrowable = exports.OnchainInteractionsCollateral = exports.OnchainInteractionsLendingPool = exports.OnchainInteractionsPoolToken = exports.OnchainInteractions = exports.OnchainContractsHelper = exports.OnchainAccountLendingVault = exports.OnchainAccountNftlpUniswapV3 = exports.OnchainAccountNftlp = exports.OnchainAccountCollateralV3 = exports.OnchainAccountBorrowableV3 = exports.OnchainAccountLendingPoolV3 = exports.OnchainAccountCollateralV2 = exports.OnchainAccountBorrowableV2 = exports.OnchainAccountLendingPoolV2 = exports.OnchainAccountCollateral = exports.OnchainAccountBorrowable = exports.OnchainAccountLendingPool = exports.OnchainAccountPoolToken = exports.OnchainAccount = exports.OnchainPairConfig = exports.OnchainProposal = exports.OnchainConfigManager = exports.OnchainLendingVault = exports.OnchainNftlpUniswapV3 = exports.OnchainNftlp = exports.OnchainCollateralV3 = exports.OnchainBorrowableV3 = exports.OnchainLendingPoolV3 = exports.OnchainCollateralV2 = exports.OnchainBorrowableV2 = exports.OnchainLendingPoolV2 = exports.OnchainCollateral = void 0;
|
|
31
|
+
exports.PermitType = exports.PositionType = exports.LendingPoolVersion = exports.SortDirection = exports.LendingPoolListOrderBy = exports.VaultListOrderBy = exports.WhitelistState = exports.ProposalState = exports.Amms = exports.PoolTokenType = exports.Extension = exports.Factory = exports.Networks = exports.XIMX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = exports.IMPERMAX_CHEF_SUBGRAPH_URL = exports.IMPERMAX_SUBGRAPH_URL = exports.APPROVE_AMOUNT = exports.ZERO = exports.DEADLINE = exports.NOT_SYNCED = exports.getFarmByStakedLPFactory = exports.STAKED_LP_FACTORY = exports.hrFarms = exports.Farms = exports.V2_FACTORIES = exports.LIQUIDATION_FEE_FACTORIES = exports.OLD_KINK_MULTIPLIER_FACTORIES = exports.BORROW_FEE_FACTORIES = exports.SOLIDEX_FACTORIES = exports.ETH_NAME = exports.ETH_SYMBOL = exports.DEBANK_IDS = exports.AMM_LP_FEE = exports.ADD_LIQUIDITY_URLS = exports.AMM_SUBGRAPH_URLS = exports.getAmmByFactory = exports.AMM_FACTORY = exports.hrAmms = exports.MERKLE_URL_IBEX_2 = exports.MERKLE_URL_IBEX = exports.MERKLE_URL_ETH = exports.WETH = exports.SIMPLE_UNISWAP_ORACLE = exports.ROUTER = exports.MERKLE_DISTRIBUTOR_ETH = exports.MERKLE_DISTRIBUTOR_IBEX_2 = exports.MERKLE_DISTRIBUTOR_IBEX = exports.LENDING_VAULT_WATCHER = exports.getFactoryByAddress = void 0;
|
|
32
|
+
exports.UniswapV2Position = exports.UniswapV3Position = exports.isV3Factory = exports.uniV3TickToPrice = exports.formatPriceSqrtX96 = exports.MIN_TICK = exports.MAX_TICK = exports.decimalToBalance = exports.Borrowable = void 0;
|
|
32
33
|
const offchain_1 = __importStar(require("./offchain"));
|
|
33
34
|
exports.Offchain = offchain_1.default;
|
|
34
35
|
Object.defineProperty(exports, "OffchainAccount", { enumerable: true, get: function () { return offchain_1.OffchainAccount; } });
|
|
@@ -142,7 +143,13 @@ Object.defineProperty(exports, "OffchainMultichainAccount", { enumerable: true,
|
|
|
142
143
|
const lendingPool_3 = __importStar(require("./onchain/impermaxFactory/lendingPool"));
|
|
143
144
|
exports.OnchainLendingPool = lendingPool_3.default;
|
|
144
145
|
Object.defineProperty(exports, "OnchainBorrowable", { enumerable: true, get: function () { return lendingPool_3.OnchainBorrowable; } });
|
|
146
|
+
Object.defineProperty(exports, "OnchainBorrowableV2", { enumerable: true, get: function () { return lendingPool_3.OnchainBorrowableV2; } });
|
|
147
|
+
Object.defineProperty(exports, "OnchainBorrowableV3", { enumerable: true, get: function () { return lendingPool_3.OnchainBorrowableV3; } });
|
|
145
148
|
Object.defineProperty(exports, "OnchainCollateral", { enumerable: true, get: function () { return lendingPool_3.OnchainCollateral; } });
|
|
149
|
+
Object.defineProperty(exports, "OnchainCollateralV2", { enumerable: true, get: function () { return lendingPool_3.OnchainCollateralV2; } });
|
|
150
|
+
Object.defineProperty(exports, "OnchainCollateralV3", { enumerable: true, get: function () { return lendingPool_3.OnchainCollateralV3; } });
|
|
151
|
+
Object.defineProperty(exports, "OnchainLendingPoolV2", { enumerable: true, get: function () { return lendingPool_3.OnchainLendingPoolV2; } });
|
|
152
|
+
Object.defineProperty(exports, "OnchainLendingPoolV3", { enumerable: true, get: function () { return lendingPool_3.OnchainLendingPoolV3; } });
|
|
146
153
|
const configManager_2 = __importStar(require("./onchain/configManager"));
|
|
147
154
|
exports.OnchainConfigManager = configManager_2.default;
|
|
148
155
|
Object.defineProperty(exports, "OnchainPairConfig", { enumerable: true, get: function () { return configManager_2.OnchainPairConfig; } });
|
|
@@ -153,7 +160,11 @@ Object.defineProperty(exports, "OnchainAccountLendingVault", { enumerable: true,
|
|
|
153
160
|
Object.defineProperty(exports, "OnchainAccountPoolToken", { enumerable: true, get: function () { return account_2.OnchainAccountPoolToken; } });
|
|
154
161
|
const lendingPool_4 = require("./onchain/account/lendingPool");
|
|
155
162
|
Object.defineProperty(exports, "OnchainAccountBorrowable", { enumerable: true, get: function () { return lendingPool_4.OnchainAccountBorrowable; } });
|
|
163
|
+
Object.defineProperty(exports, "OnchainAccountBorrowableV2", { enumerable: true, get: function () { return lendingPool_4.OnchainAccountBorrowableV2; } });
|
|
164
|
+
Object.defineProperty(exports, "OnchainAccountBorrowableV3", { enumerable: true, get: function () { return lendingPool_4.OnchainAccountBorrowableV3; } });
|
|
156
165
|
Object.defineProperty(exports, "OnchainAccountCollateral", { enumerable: true, get: function () { return lendingPool_4.OnchainAccountCollateral; } });
|
|
166
|
+
Object.defineProperty(exports, "OnchainAccountCollateralV2", { enumerable: true, get: function () { return lendingPool_4.OnchainAccountCollateralV2; } });
|
|
167
|
+
Object.defineProperty(exports, "OnchainAccountCollateralV3", { enumerable: true, get: function () { return lendingPool_4.OnchainAccountCollateralV3; } });
|
|
157
168
|
const interactions_1 = require("./onchain/interactions");
|
|
158
169
|
Object.defineProperty(exports, "OnchainInteractionsLendingPool", { enumerable: true, get: function () { return interactions_1.OnchainInteractionsLendingPool; } });
|
|
159
170
|
Object.defineProperty(exports, "OnchainInteractionsLendingVault", { enumerable: true, get: function () { return interactions_1.OnchainInteractionsLendingVault; } });
|
|
@@ -161,7 +172,12 @@ Object.defineProperty(exports, "OnchainInteractionsPoolToken", { enumerable: tru
|
|
|
161
172
|
Object.defineProperty(exports, "OnchainInteractionsConfigManager", { enumerable: true, get: function () { return interactions_1.OnchainInteractionsConfigManager; } });
|
|
162
173
|
const lendingPool_5 = require("./onchain/interactions/lendingPool");
|
|
163
174
|
Object.defineProperty(exports, "OnchainInteractionsBorrowable", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsBorrowable; } });
|
|
175
|
+
Object.defineProperty(exports, "OnchainInteractionsBorrowableV2", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsBorrowableV2; } });
|
|
176
|
+
Object.defineProperty(exports, "OnchainInteractionsBorrowableV3", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsBorrowableV3; } });
|
|
164
177
|
Object.defineProperty(exports, "OnchainInteractionsCollateral", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsCollateral; } });
|
|
178
|
+
Object.defineProperty(exports, "OnchainInteractionsCollateralV2", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsCollateralV2; } });
|
|
179
|
+
Object.defineProperty(exports, "OnchainInteractionsCollateralV3", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsCollateralV3; } });
|
|
180
|
+
Object.defineProperty(exports, "OnchainInteractionsLendingPoolV2", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsLendingPoolV2; } });
|
|
165
181
|
Object.defineProperty(exports, "OnchainInteractionsLendingPoolV3", { enumerable: true, get: function () { return lendingPool_5.OnchainInteractionsLendingPoolV3; } });
|
|
166
182
|
const lending_vault_watcher_1 = require("./config/contracts/lending-vault-watcher");
|
|
167
183
|
Object.defineProperty(exports, "LENDING_VAULT_WATCHER", { enumerable: true, get: function () { return lending_vault_watcher_1.LENDING_VAULT_WATCHER; } });
|
|
@@ -182,7 +198,8 @@ Object.defineProperty(exports, "LendingPoolVersion", { enumerable: true, get: fu
|
|
|
182
198
|
const offchainMultichainAccount_1 = require("./offchain/account/offchainMultichainAccount");
|
|
183
199
|
Object.defineProperty(exports, "PositionType", { enumerable: true, get: function () { return offchainMultichainAccount_1.PositionType; } });
|
|
184
200
|
// Nftlp
|
|
185
|
-
const nftlp_1 = require("./onchain/interactions/lendingPool/nftlp");
|
|
201
|
+
const nftlp_1 = __importStar(require("./onchain/interactions/lendingPool/nftlp"));
|
|
202
|
+
exports.OnchainInteractionsNftlp = nftlp_1.default;
|
|
186
203
|
Object.defineProperty(exports, "OnchainInteractionsNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_1.OnchainInteractionsNftlpUniswapV3; } });
|
|
187
204
|
const onchainAccountNftlpUniswapV3_1 = __importDefault(require("./onchain/account/lendingPool/nftlp/onchainAccountNftlpUniswapV3"));
|
|
188
205
|
exports.OnchainAccountNftlpUniswapV3 = onchainAccountNftlpUniswapV3_1.default;
|
|
@@ -206,3 +223,38 @@ const uniswapV3_1 = __importDefault(require("./utils/position/uniswapV3"));
|
|
|
206
223
|
exports.UniswapV3Position = uniswapV3_1.default;
|
|
207
224
|
const uniswapV2_1 = __importDefault(require("./utils/position/uniswapV2"));
|
|
208
225
|
exports.UniswapV2Position = uniswapV2_1.default;
|
|
226
|
+
const offchainLendingPoolV2_1 = __importDefault(require("./offchain/lendingPool/offchainLendingPoolV2"));
|
|
227
|
+
exports.OffchainLendingPoolV2 = offchainLendingPoolV2_1.default;
|
|
228
|
+
const offchainBorrowableV2_1 = __importDefault(require("./offchain/lendingPool/offchainBorrowableV2"));
|
|
229
|
+
exports.OffchainBorrowableV2 = offchainBorrowableV2_1.default;
|
|
230
|
+
const offchainCollateralV2_1 = __importDefault(require("./offchain/lendingPool/offchainCollateralV2"));
|
|
231
|
+
exports.OffchainCollateralV2 = offchainCollateralV2_1.default;
|
|
232
|
+
const offchainBorrowableV3_1 = __importDefault(require("./offchain/lendingPool/offchainBorrowableV3"));
|
|
233
|
+
exports.OffchainBorrowableV3 = offchainBorrowableV3_1.default;
|
|
234
|
+
const offchainLendingPoolV3_1 = __importDefault(require("./offchain/lendingPool/offchainLendingPoolV3"));
|
|
235
|
+
exports.OffchainLendingPoolV3 = offchainLendingPoolV3_1.default;
|
|
236
|
+
const nftlp_2 = __importStar(require("./offchain/lendingPool/nftlp"));
|
|
237
|
+
exports.OffchainNftlp = nftlp_2.default;
|
|
238
|
+
Object.defineProperty(exports, "OffchainNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_2.OffchainNftlpUniswapV3; } });
|
|
239
|
+
const offchainCollateralV3_1 = __importDefault(require("./offchain/lendingPool/offchainCollateralV3"));
|
|
240
|
+
exports.OffchainCollateralV3 = offchainCollateralV3_1.default;
|
|
241
|
+
const offchainAccountLendingPoolV2_1 = __importDefault(require("./offchain/account/lendingPool/offchainAccountLendingPoolV2"));
|
|
242
|
+
exports.OffchainAccountLendingPoolV2 = offchainAccountLendingPoolV2_1.default;
|
|
243
|
+
const offchainAccountBorrowableV2_1 = __importDefault(require("./offchain/account/lendingPool/offchainAccountBorrowableV2"));
|
|
244
|
+
exports.OffchainAccountBorrowableV2 = offchainAccountBorrowableV2_1.default;
|
|
245
|
+
const offchainAccountCollateralV3_1 = __importDefault(require("./offchain/account/lendingPool/offchainAccountCollateralV3"));
|
|
246
|
+
exports.OffchainAccountCollateralV3 = offchainAccountCollateralV3_1.default;
|
|
247
|
+
const offchainAccountNftlp_1 = __importDefault(require("./offchain/account/lendingPool/nftlp/offchainAccountNftlp"));
|
|
248
|
+
exports.OffchainAccountNftlp = offchainAccountNftlp_1.default;
|
|
249
|
+
const impermaxFactory_1 = require("./onchain/impermaxFactory");
|
|
250
|
+
Object.defineProperty(exports, "OnchainImpermaxFactoryV3", { enumerable: true, get: function () { return impermaxFactory_1.OnchainImpermaxFactoryV3; } });
|
|
251
|
+
const impermaxFactory_2 = require("./onchain/impermaxFactory");
|
|
252
|
+
Object.defineProperty(exports, "OnchainImpermaxFactoryV2", { enumerable: true, get: function () { return impermaxFactory_2.OnchainImpermaxFactoryV2; } });
|
|
253
|
+
const nftlp_3 = require("./onchain/impermaxFactory/lendingPool/nftlp");
|
|
254
|
+
Object.defineProperty(exports, "OnchainNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_3.OnchainNftlpUniswapV3; } });
|
|
255
|
+
const nftlp_4 = __importDefault(require("./onchain/impermaxFactory/lendingPool/nftlp"));
|
|
256
|
+
exports.OnchainNftlp = nftlp_4.default;
|
|
257
|
+
const nftlp_5 = __importDefault(require("./onchain/account/lendingPool/nftlp"));
|
|
258
|
+
exports.OnchainAccountNftlp = nftlp_5.default;
|
|
259
|
+
const offchainAccountBorrowableV3_1 = __importDefault(require("./offchain/account/lendingPool/offchainAccountBorrowableV3"));
|
|
260
|
+
exports.OffchainAccountBorrowableV3 = offchainAccountBorrowableV3_1.default;
|
|
@@ -5,7 +5,7 @@ export default abstract class OffchainAccountNftlp {
|
|
|
5
5
|
protected cache: {};
|
|
6
6
|
constructor(collateral: OffchainAccountCollateralV3);
|
|
7
7
|
getLendingPool: () => import("../offchainAccountLendingPoolV3").default;
|
|
8
|
-
getNftlp: () => import("
|
|
8
|
+
getNftlp: () => import("../../../..").OffchainNftlp;
|
|
9
9
|
cleanCache(): void;
|
|
10
10
|
abstract getTokenPositions(): Promise<Record<string, NftlpPosition>>;
|
|
11
11
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import OffchainCollateralV3 from "../offchainCollateralV3";
|
|
2
2
|
import OffchainAccountCollateralV3 from "../../account/lendingPool/offchainAccountCollateralV3";
|
|
3
3
|
import OffchainAccountNftlp from "../../account/lendingPool/nftlp/offchainAccountNftlp";
|
|
4
|
+
import { Extension } from "../../../config/types";
|
|
4
5
|
export default abstract class OffchainNftlp {
|
|
5
6
|
protected readonly collateral: OffchainCollateralV3;
|
|
6
7
|
protected cache: {
|
|
@@ -8,6 +9,7 @@ export default abstract class OffchainNftlp {
|
|
|
8
9
|
oraclePrice?: Promise<number>;
|
|
9
10
|
};
|
|
10
11
|
constructor(collateral: OffchainCollateralV3);
|
|
12
|
+
abstract getExtension(): Extension;
|
|
11
13
|
abstract getNewAccountNftlpObject(accountCollateral: OffchainAccountCollateralV3): OffchainAccountNftlp;
|
|
12
14
|
getLendingPool: () => import("../offchainLendingPoolV3").default;
|
|
13
15
|
getNftlpAddress: () => string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import OffchainNftlp from "./offchainNftlp";
|
|
2
2
|
import OffchainAccountCollateralV3 from "../../account/lendingPool/offchainAccountCollateralV3";
|
|
3
3
|
import OffchainAccountNftlpUniswapV3 from "../../account/lendingPool/nftlp/offchainAccountNftlpUniswapV3";
|
|
4
|
+
import { Extension } from "../../../config/types";
|
|
4
5
|
export default class OffchainNftlpUniswapV3 extends OffchainNftlp {
|
|
5
6
|
protected cache: {
|
|
6
7
|
marketPrice?: Promise<number>;
|
|
@@ -9,6 +10,7 @@ export default class OffchainNftlpUniswapV3 extends OffchainNftlp {
|
|
|
9
10
|
[key in number]: Promise<number | null>;
|
|
10
11
|
};
|
|
11
12
|
};
|
|
13
|
+
getExtension(): Extension;
|
|
12
14
|
getNewAccountNftlpObject(accountCollateral: OffchainAccountCollateralV3): OffchainAccountNftlpUniswapV3;
|
|
13
15
|
protected initializeUniswapV3Pool(fee: number): Promise<{
|
|
14
16
|
price: number;
|
|
@@ -7,12 +7,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const offchainNftlp_1 = __importDefault(require("./offchainNftlp"));
|
|
8
8
|
const offchainAccountNftlpUniswapV3_1 = __importDefault(require("../../account/lendingPool/nftlp/offchainAccountNftlpUniswapV3"));
|
|
9
9
|
const uniswapV3General_1 = require("../../../utils/nftlpMath/uniswapV3General");
|
|
10
|
+
const types_1 = require("../../../config/types");
|
|
10
11
|
const FEES = [100, 500, 3000, 10000];
|
|
11
12
|
class OffchainNftlpUniswapV3 extends offchainNftlp_1.default {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(...arguments);
|
|
14
15
|
this.cache = {};
|
|
15
16
|
}
|
|
17
|
+
getExtension() {
|
|
18
|
+
return types_1.Extension.UniswapV3;
|
|
19
|
+
}
|
|
16
20
|
getNewAccountNftlpObject(accountCollateral) {
|
|
17
21
|
return new offchainAccountNftlpUniswapV3_1.default(accountCollateral);
|
|
18
22
|
}
|
|
@@ -5,6 +5,6 @@ export default abstract class OnchainAccountNftlp {
|
|
|
5
5
|
protected cache: {};
|
|
6
6
|
constructor(collateral: OnchainAccountCollateralV3);
|
|
7
7
|
getLendingPool: () => OnchainAccountLendingPoolV3;
|
|
8
|
-
getNftlp: () => import("
|
|
8
|
+
getNftlp: () => import("../../../..").OnchainNftlp;
|
|
9
9
|
cleanCache(): void;
|
|
10
10
|
}
|
|
@@ -5,6 +5,7 @@ import OnchainAccountNftlp from "../../../account/lendingPool/nftlp";
|
|
|
5
5
|
import { OnchainInteractionsCollateralV3 } from "../../../interactions/lendingPool";
|
|
6
6
|
import OnchainInteractionsNftlp from "../../../interactions/lendingPool/nftlp";
|
|
7
7
|
import OnchainCollateralV3 from "../onchainCollateralV3";
|
|
8
|
+
import { Extension } from "../../../../config/types";
|
|
8
9
|
export default abstract class OnchainNftlp {
|
|
9
10
|
protected readonly collateral: OnchainCollateralV3;
|
|
10
11
|
protected cache: {
|
|
@@ -12,6 +13,7 @@ export default abstract class OnchainNftlp {
|
|
|
12
13
|
marketPrice?: Promise<number>;
|
|
13
14
|
oraclePrice?: Promise<number>;
|
|
14
15
|
};
|
|
16
|
+
abstract getExtension(): Extension;
|
|
15
17
|
abstract getNewAccountNftlpObject(accountCollateral: OnchainAccountCollateralV3): OnchainAccountNftlp;
|
|
16
18
|
abstract getNewInteractionsNftlpObject(interactionsCollateral: OnchainInteractionsCollateralV3): OnchainInteractionsNftlp;
|
|
17
19
|
constructor(collateral: OnchainCollateralV3);
|
|
@@ -4,6 +4,7 @@ import { OnchainAccountCollateralV3 } from "../../../account/lendingPool";
|
|
|
4
4
|
import { OnchainAccountNftlpUniswapV3 } from "../../../account/lendingPool/nftlp";
|
|
5
5
|
import { OnchainInteractionsNftlpUniswapV3 } from "../../../interactions/lendingPool/nftlp";
|
|
6
6
|
import { OnchainInteractionsCollateralV3 } from "../../../interactions/lendingPool";
|
|
7
|
+
import { Extension } from "../../../../config/types";
|
|
7
8
|
export default class OnchainNftlpUniswapV3 extends OnchainNftlp {
|
|
8
9
|
protected cache: {
|
|
9
10
|
nftlp?: Contract;
|
|
@@ -13,6 +14,7 @@ export default class OnchainNftlpUniswapV3 extends OnchainNftlp {
|
|
|
13
14
|
marketPrice?: Promise<number>;
|
|
14
15
|
oraclePrice?: Promise<number>;
|
|
15
16
|
};
|
|
17
|
+
getExtension(): Extension;
|
|
16
18
|
getNewAccountNftlpObject(accountCollateral: OnchainAccountCollateralV3): OnchainAccountNftlpUniswapV3;
|
|
17
19
|
getNewInteractionsNftlpObject(interactionsCollateral: OnchainInteractionsCollateralV3): OnchainInteractionsNftlpUniswapV3;
|
|
18
20
|
protected initializeNftlp(): any;
|
|
@@ -7,6 +7,7 @@ const onchainNftlp_1 = __importDefault(require("./onchainNftlp"));
|
|
|
7
7
|
const nftlp_1 = require("../../../account/lendingPool/nftlp");
|
|
8
8
|
const nftlp_2 = require("../../../interactions/lendingPool/nftlp");
|
|
9
9
|
const uniswapV3General_1 = require("../../../../utils/nftlpMath/uniswapV3General");
|
|
10
|
+
const types_1 = require("../../../../config/types");
|
|
10
11
|
const FEES = [
|
|
11
12
|
100,
|
|
12
13
|
500,
|
|
@@ -18,6 +19,9 @@ class OnchainNftlpUniswapV3 extends onchainNftlp_1.default {
|
|
|
18
19
|
super(...arguments);
|
|
19
20
|
this.cache = {};
|
|
20
21
|
}
|
|
22
|
+
getExtension() {
|
|
23
|
+
return types_1.Extension.UniswapV3;
|
|
24
|
+
}
|
|
21
25
|
getNewAccountNftlpObject(accountCollateral) {
|
|
22
26
|
return new nftlp_1.OnchainAccountNftlpUniswapV3(accountCollateral);
|
|
23
27
|
}
|
|
@@ -8,15 +8,16 @@ export default abstract class OnchainInteractionsNftlp {
|
|
|
8
8
|
protected cache: {};
|
|
9
9
|
constructor(collateral: OnchainInteractionsCollateralV3);
|
|
10
10
|
getLendingPool: () => OnchainInteractionsLendingPoolV3;
|
|
11
|
-
getNftlp: () => import("
|
|
11
|
+
getNftlp: () => import("../../../..").OnchainNftlp;
|
|
12
12
|
protected getOnchain: () => import("../../..").default;
|
|
13
13
|
protected getPermitHelper: () => import("../../../onchainPermitHelper").default;
|
|
14
14
|
getActionsGetter: () => any;
|
|
15
|
-
getAccountNftlp: () => import("
|
|
15
|
+
getAccountNftlp: () => import("../../../..").OnchainAccountNftlp;
|
|
16
16
|
getAccountAddress: () => string;
|
|
17
17
|
protected getUiMargin: () => number;
|
|
18
18
|
protected getDust: () => number;
|
|
19
19
|
protected encodePermits: (permits: Permits) => string;
|
|
20
|
+
getRouter: () => any;
|
|
20
21
|
cleanCache(): void;
|
|
21
22
|
/**
|
|
22
23
|
* Utilities
|
|
@@ -14,6 +14,7 @@ class OnchainInteractionsNftlp {
|
|
|
14
14
|
this.getUiMargin = () => this.getLendingPool().getLendingPool().getImpermaxFactory().getOnchain().uiMargin;
|
|
15
15
|
this.getDust = () => this.getLendingPool().getLendingPool().getImpermaxFactory().getOnchain().dust;
|
|
16
16
|
this.encodePermits = (permits) => this.getLendingPool().getInteractions().getOnchain().getPermitHelper().encodePermits(permits);
|
|
17
|
+
this.getRouter = () => this.getLendingPool().getLendingPool().getImpermaxFactory().getRouterExtension(this.getNftlp().getExtension());
|
|
17
18
|
this.collateral = collateral;
|
|
18
19
|
}
|
|
19
20
|
cleanCache() {
|
|
@@ -4,7 +4,6 @@ import { OnchainAccountNftlpUniswapV3 } from "../../../account/lendingPool/nftlp
|
|
|
4
4
|
import { BigNumber } from "ethers";
|
|
5
5
|
export default class OnchainInteractionsNftlpUniswapV3 extends OnchainInteractionsNftlp {
|
|
6
6
|
protected cache: {};
|
|
7
|
-
getUniswapV3Router: () => any;
|
|
8
7
|
getNftlp: () => any;
|
|
9
8
|
getAccountNftlp: () => OnchainAccountNftlpUniswapV3;
|
|
10
9
|
getOwnerSpender(): {
|
|
@@ -4,21 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const onchainInteractionsNftlp_1 = __importDefault(require("./onchainInteractionsNftlp"));
|
|
7
|
-
const types_1 = require("../../../../config/types");
|
|
8
7
|
const ether_utils_1 = require("../../../../utils/ether-utils");
|
|
9
8
|
const general_1 = require("../../../../config/general");
|
|
10
9
|
class OnchainInteractionsNftlpUniswapV3 extends onchainInteractionsNftlp_1.default {
|
|
11
10
|
constructor() {
|
|
12
11
|
super(...arguments);
|
|
13
12
|
this.cache = {};
|
|
14
|
-
this.getUniswapV3Router = () => this.getLendingPool().getLendingPool().getImpermaxFactory().getRouterExtension(types_1.Extension.UniswapV3);
|
|
15
13
|
this.getNftlp = () => this.getLendingPool().getLendingPool().getNftlp();
|
|
16
14
|
this.getAccountNftlp = () => this.getLendingPool().getAccountLendingPool().getNftlp();
|
|
17
15
|
}
|
|
18
16
|
getOwnerSpender() {
|
|
19
17
|
return {
|
|
20
18
|
owner: this.getAccountAddress(),
|
|
21
|
-
spender: this.
|
|
19
|
+
spender: this.getRouter()._address,
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
22
|
async getMintEmptyAction() {
|
|
@@ -56,7 +54,7 @@ class OnchainInteractionsNftlpUniswapV3 extends onchainInteractionsNftlp_1.defau
|
|
|
56
54
|
let actions = [];
|
|
57
55
|
if (depositADelta > 0 && depositBDelta < 0 || depositBDelta > 0 && depositADelta < 0)
|
|
58
56
|
throw new Error("Opposite depositADelta and depositBDelta signs");
|
|
59
|
-
const router = this.
|
|
57
|
+
const router = this.getRouter();
|
|
60
58
|
const actionsGetter = this.getActionsGetter();
|
|
61
59
|
let percentageToRemove = 0;
|
|
62
60
|
if (depositADelta > 0 || depositBDelta > 0) {
|
|
@@ -227,7 +225,7 @@ class OnchainInteractionsNftlpUniswapV3 extends onchainInteractionsNftlp_1.defau
|
|
|
227
225
|
};
|
|
228
226
|
}
|
|
229
227
|
async execute(tokenId, actions, permits, withCollateralTransfer, ethValue, onTransactionHash) {
|
|
230
|
-
const router = this.
|
|
228
|
+
const router = this.getRouter();
|
|
231
229
|
return this.getLendingPool().send(router.methods.execute(await this.getNftlp().getNftlpAddress(), tokenId == -1 ? general_1.MAX_UINT : tokenId.toString(), this.encodeActions(actions), this.encodePermits(permits), withCollateralTransfer), onTransactionHash, ethValue);
|
|
232
230
|
}
|
|
233
231
|
}
|
|
@@ -15,7 +15,7 @@ export default class OnchainInteractionsCollateralV2 extends OnchainInteractions
|
|
|
15
15
|
getInteractions: () => import("..").default;
|
|
16
16
|
getActionsGetter: () => any;
|
|
17
17
|
getPoolTokenRouter: () => any;
|
|
18
|
-
|
|
18
|
+
getRouter: () => any;
|
|
19
19
|
getDust: () => number;
|
|
20
20
|
protected encodePermits: (permits: Permits) => string;
|
|
21
21
|
getAccountPoolToken(): OnchainAccountCollateralV2;
|
|
@@ -16,7 +16,7 @@ class OnchainInteractionsCollateralV2 extends onchainInteractionsPoolToken_1.def
|
|
|
16
16
|
this.getInteractions = () => this.lendingPool.getInteractions();
|
|
17
17
|
this.getActionsGetter = () => this.getLendingPool().getLendingPool().getImpermaxFactory().getActionsGetter();
|
|
18
18
|
this.getPoolTokenRouter = () => this.lendingPool.getPoolTokenRouter();
|
|
19
|
-
this.
|
|
19
|
+
this.getRouter = () => this.lendingPool.getLendingPool().getImpermaxFactory().getRouter();
|
|
20
20
|
this.getDust = () => this.lendingPool.getLendingPool().getImpermaxFactory().getOnchain().dust;
|
|
21
21
|
this.encodePermits = (permits) => this.getLendingPool().getInteractions().getOnchain().getPermitHelper().encodePermits(permits);
|
|
22
22
|
this.getAccountCollateral = this.getAccountPoolToken;
|
|
@@ -51,7 +51,7 @@ class OnchainInteractionsCollateralV2 extends onchainInteractionsPoolToken_1.def
|
|
|
51
51
|
getOwnerSpender() {
|
|
52
52
|
return {
|
|
53
53
|
owner: this.getAccountAddress(),
|
|
54
|
-
spender: this.
|
|
54
|
+
spender: this.getRouter()._address,
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
@@ -77,7 +77,7 @@ class OnchainInteractionsCollateralV2 extends onchainInteractionsPoolToken_1.def
|
|
|
77
77
|
let actions = [];
|
|
78
78
|
if (depositADelta > 0 && depositBDelta < 0 || depositBDelta > 0 && depositADelta < 0)
|
|
79
79
|
throw new Error("Opposite depositADelta and depositBDelta signs");
|
|
80
|
-
const router = this.
|
|
80
|
+
const router = this.getRouter();
|
|
81
81
|
const actionsGetter = this.getActionsGetter();
|
|
82
82
|
let percentageToRemove = 0;
|
|
83
83
|
if (depositADelta > 0 || depositBDelta > 0) {
|
|
@@ -257,7 +257,7 @@ class OnchainInteractionsCollateralV2 extends onchainInteractionsPoolToken_1.def
|
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
async execute(actions, permits, ethValue, onTransactionHash) {
|
|
260
|
-
const router = this.
|
|
260
|
+
const router = this.getRouter();
|
|
261
261
|
return this.getLendingPool().send(router.methods.execute(await this.getCollateral().getTokenAddress(), this.encodeActions(actions), this.encodePermits(permits)), onTransactionHash, ethValue);
|
|
262
262
|
}
|
|
263
263
|
}
|