@gearbox-protocol/sdk 0.0.61 → 0.0.64
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/core/contracts.js +5 -5
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/pathfinder/path.js +9 -8
- package/lib/pathfinder/priority.d.ts +1 -1
- package/lib/pathfinder/priority.js +11 -11
- package/lib/tokens/convex.d.ts +2 -1
- package/lib/tokens/convex.js +11 -11
- package/lib/tokens/curveLP.d.ts +2 -1
- package/lib/tokens/curveLP.js +7 -7
- package/lib/tokens/gear.d.ts +2 -1
- package/lib/tokens/gear.js +6 -6
- package/lib/tokens/normal.d.ts +2 -1
- package/lib/tokens/normal.js +29 -29
- package/lib/tokens/token.d.ts +0 -12
- package/lib/tokens/token.js +7 -20
- package/lib/tokens/tokenType.d.ts +12 -0
- package/lib/tokens/tokenType.js +16 -0
- package/lib/tokens/yearn.d.ts +2 -1
- package/lib/tokens/yearn.js +7 -7
- package/package.json +1 -1
- package/src/core/contracts.ts +6 -6
- package/src/index.ts +1 -0
- package/src/pathfinder/path.ts +3 -2
- package/src/pathfinder/priority.ts +1 -1
- package/src/tokens/convex.ts +2 -1
- package/src/tokens/curveLP.ts +2 -1
- package/src/tokens/gear.ts +2 -1
- package/src/tokens/normal.ts +2 -1
- package/src/tokens/token.ts +6 -19
- package/src/tokens/tokenType.ts +12 -0
- package/src/tokens/yearn.ts +2 -1
- package/lib/core/pathfinder.d.ts +0 -54
- package/lib/core/pathfinder.js +0 -612
- package/lib/core/token.d.ts +0 -104
- package/lib/core/token.js +0 -1359
- package/lib/core/tokenData.d.ts +0 -24
- package/lib/core/tokenData.js +0 -57
- package/lib/pathfinder/connector.d.ts +0 -7
- package/lib/pathfinder/connector.js +0 -78
- package/lib/pathfinder/connectorPathAsset.d.ts +0 -7
- package/lib/pathfinder/connectorPathAsset.js +0 -144
- package/lib/pathfinder/convexLPTokenPathAsset.d.ts +0 -5
- package/lib/pathfinder/convexLPTokenPathAsset.js +0 -77
- package/lib/pathfinder/curveLPPathAsset.d.ts +0 -5
- package/lib/pathfinder/curveLPPathAsset.js +0 -72
- package/lib/pathfinder/curveMetaLP.d.ts +0 -5
- package/lib/pathfinder/curveMetaLP.js +0 -72
- package/lib/pathfinder/metaCurveLPPathAsset.d.ts +0 -5
- package/lib/pathfinder/metaCurveLPPathAsset.js +0 -72
- package/lib/pathfinder/normalToken.d.ts +0 -7
- package/lib/pathfinder/normalToken.js +0 -78
- package/lib/pathfinder/normalTokenPathAsset.d.ts +0 -5
- package/lib/pathfinder/normalTokenPathAsset.js +0 -136
- package/lib/pathfinder/notes.d.ts +0 -4
- package/lib/pathfinder/notes.js +0 -58
- package/lib/pathfinder/pathfinder.d.ts +0 -24
- package/lib/pathfinder/pathfinder.js +0 -132
- package/lib/pathfinder/yearnVaultOfCurveLPPathAsset.d.ts +0 -5
- package/lib/pathfinder/yearnVaultOfCurveLPPathAsset.js +0 -87
- package/lib/pathfinder/yearnVaultOfMetaCurveLPPathAsset.d.ts +0 -5
- package/lib/pathfinder/yearnVaultOfMetaCurveLPPathAsset.js +0 -87
- package/lib/pathfinder/yearnVaultPathAsset.d.ts +0 -5
- package/lib/pathfinder/yearnVaultPathAsset.js +0 -87
- package/lib/types/ACL.d.ts +0 -491
- package/lib/types/ACLTrait.d.ts +0 -148
- package/lib/types/ACLTraitTest.d.ts +0 -209
- package/lib/types/AccountFactory.d.ts +0 -716
- package/lib/types/AccountMining.d.ts +0 -222
- package/lib/types/AddressProvider.d.ts +0 -912
- package/lib/types/AggregatorV3Interface.d.ts +0 -234
- package/lib/types/ChainlinkPriceFeedMock.d.ts +0 -215
- package/lib/types/ContractsRegister.d.ts +0 -398
- package/lib/types/CreditAccount.d.ts +0 -443
- package/lib/types/CreditFilter.d.ts +0 -1609
- package/lib/types/CreditFilterMock.d.ts +0 -1687
- package/lib/types/CreditManager.d.ts +0 -1285
- package/lib/types/CreditManagerMockForFilter.d.ts +0 -605
- package/lib/types/CreditManagerMockForPoolTest.d.ts +0 -204
- package/lib/types/CurveMock.d.ts +0 -298
- package/lib/types/CurveV1Adapter.d.ts +0 -349
- package/lib/types/DataCompressor.d.ts +0 -1331
- package/lib/types/DieselToken.d.ts +0 -567
- package/lib/types/ERC165.d.ts +0 -116
- package/lib/types/ERC20.d.ts +0 -411
- package/lib/types/ERC20BlockingMock.d.ts +0 -568
- package/lib/types/ERC721.d.ts +0 -625
- package/lib/types/Errors.d.ts +0 -1854
- package/lib/types/ExecutorMock.d.ts +0 -140
- package/lib/types/FlashLoanAttacker.d.ts +0 -170
- package/lib/types/FuzzHarness.d.ts +0 -124
- package/lib/types/GearBeta.d.ts +0 -745
- package/lib/types/GearToken.d.ts +0 -888
- package/lib/types/IAccountFactory.d.ts +0 -317
- package/lib/types/IAccountMiner.d.ts +0 -124
- package/lib/types/IAppAddressProvider.d.ts +0 -198
- package/lib/types/IAppCreditManager.d.ts +0 -408
- package/lib/types/IAppERC20.d.ts +0 -309
- package/lib/types/IAppPoolService.d.ts +0 -166
- package/lib/types/ICreditAccount.d.ts +0 -430
- package/lib/types/ICreditFilter.d.ts +0 -1162
- package/lib/types/ICreditManager.d.ts +0 -971
- package/lib/types/ICurvePool.d.ts +0 -298
- package/lib/types/IDataCompressor.d.ts +0 -1231
- package/lib/types/IERC165.d.ts +0 -116
- package/lib/types/IERC20.d.ts +0 -294
- package/lib/types/IERC721.d.ts +0 -472
- package/lib/types/IERC721Enumerable.d.ts +0 -564
- package/lib/types/IERC721Metadata.d.ts +0 -523
- package/lib/types/IERC721Receiver.d.ts +0 -132
- package/lib/types/IGearToken.d.ts +0 -527
- package/lib/types/IInterestRateModel.d.ts +0 -121
- package/lib/types/IMerkleDistributor.d.ts +0 -190
- package/lib/types/IPoolService.d.ts +0 -772
- package/lib/types/IPriceOracle.d.ts +0 -211
- package/lib/types/IQuoter.d.ts +0 -269
- package/lib/types/ISwapRouter.d.ts +0 -404
- package/lib/types/IUniswapV2Migrator.d.ts +0 -134
- package/lib/types/IUniswapV2Router01.d.ts +0 -1119
- package/lib/types/IUniswapV2Router02.d.ts +0 -1432
- package/lib/types/IUniswapV3SwapCallback.d.ts +0 -127
- package/lib/types/IWETH.d.ts +0 -169
- package/lib/types/IWETHGateway.d.ts +0 -335
- package/lib/types/IYVault.d.ts +0 -558
- package/lib/types/LeveragedActions.d.ts +0 -772
- package/lib/types/LinearInterestRateModel.d.ts +0 -279
- package/lib/types/MockPoolService.d.ts +0 -1271
- package/lib/types/Multicall2.d.ts +0 -449
- package/lib/types/Ownable.d.ts +0 -169
- package/lib/types/PathFinder.d.ts +0 -379
- package/lib/types/Pausable.d.ts +0 -105
- package/lib/types/PercentageMathTest.d.ts +0 -154
- package/lib/types/PoolService.d.ts +0 -1174
- package/lib/types/PriceOracle.d.ts +0 -387
- package/lib/types/StepVesting.d.ts +0 -411
- package/lib/types/TestPoolService.d.ts +0 -1294
- package/lib/types/TokenDistributor.d.ts +0 -640
- package/lib/types/TokenFeeMock.d.ts +0 -544
- package/lib/types/TokenMock.d.ts +0 -531
- package/lib/types/TreasuryMock.d.ts +0 -86
- package/lib/types/UniswapRouterMock.d.ts +0 -1520
- package/lib/types/UniswapV2Adapter.d.ts +0 -1463
- package/lib/types/UniswapV3Adapter.d.ts +0 -455
- package/lib/types/WETHGateway.d.ts +0 -376
- package/lib/types/WETHMock.d.ts +0 -433
- package/lib/types/WadRayMathTest.d.ts +0 -316
- package/lib/types/YearnAdapter.d.ts +0 -609
- package/lib/types/YearnMock.d.ts +0 -795
- package/lib/types/YearnPriceFeed.d.ts +0 -399
- package/lib/types/commons.d.ts +0 -16
- package/lib/types/commons.js +0 -5
- package/lib/types/contracts/support/PathFinder.d.ts +0 -154
- package/lib/types/contracts/support/PathFinder.js +0 -2
- package/lib/types/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/ClaimZapFormatter.d.ts +0 -52
- package/lib/types/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/ClaimZapFormatter.js +0 -2
- package/lib/types/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/index.d.ts +0 -1
- package/lib/types/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/index.js +0 -2
- package/lib/types/factories/ACLTraitTest__factory.d.ts +0 -52
- package/lib/types/factories/ACLTraitTest__factory.js +0 -138
- package/lib/types/factories/ACLTrait__factory.d.ts +0 -31
- package/lib/types/factories/ACLTrait__factory.js +0 -75
- package/lib/types/factories/ACL__factory.d.ts +0 -45
- package/lib/types/factories/ACL__factory.js +0 -317
- package/lib/types/factories/AccountFactory__factory.d.ts +0 -72
- package/lib/types/factories/AccountFactory__factory.js +0 -508
- package/lib/types/factories/AccountMining__factory.d.ts +0 -56
- package/lib/types/factories/AccountMining__factory.js +0 -192
- package/lib/types/factories/AddressProvider__factory.d.ts +0 -52
- package/lib/types/factories/AddressProvider__factory.js +0 -582
- package/lib/types/factories/AggregatorV3Interface__factory.d.ts +0 -22
- package/lib/types/factories/AggregatorV3Interface__factory.js +0 -133
- package/lib/types/factories/ChainlinkPriceFeedMock__factory.d.ts +0 -42
- package/lib/types/factories/ChainlinkPriceFeedMock__factory.js +0 -193
- package/lib/types/factories/ContractsRegister__factory.d.ts +0 -56
- package/lib/types/factories/ContractsRegister__factory.js +0 -310
- package/lib/types/factories/CreditAccount__factory.d.ts +0 -32
- package/lib/types/factories/CreditAccount__factory.js +0 -262
- package/lib/types/factories/CreditFilterMock__factory.d.ts +0 -56
- package/lib/types/factories/CreditFilterMock__factory.js +0 -1083
- package/lib/types/factories/CreditFilter__factory.d.ts +0 -56
- package/lib/types/factories/CreditFilter__factory.js +0 -1047
- package/lib/types/factories/CreditManagerMockForFilter__factory.d.ts +0 -38
- package/lib/types/factories/CreditManagerMockForFilter__factory.js +0 -324
- package/lib/types/factories/CreditManagerMockForPoolTest__factory.d.ts +0 -48
- package/lib/types/factories/CreditManagerMockForPoolTest__factory.js +0 -131
- package/lib/types/factories/CreditManager__factory.d.ts +0 -77
- package/lib/types/factories/CreditManager__factory.js +0 -1030
- package/lib/types/factories/CurveMock__factory.d.ts +0 -42
- package/lib/types/factories/CurveMock__factory.js +0 -210
- package/lib/types/factories/CurveV1Adapter__factory.d.ts +0 -42
- package/lib/types/factories/CurveV1Adapter__factory.js +0 -254
- package/lib/types/factories/DataCompressor__factory.d.ts +0 -71
- package/lib/types/factories/DataCompressor__factory.js +0 -944
- package/lib/types/factories/DieselToken__factory.d.ts +0 -56
- package/lib/types/factories/DieselToken__factory.js +0 -432
- package/lib/types/factories/ERC165__factory.d.ts +0 -22
- package/lib/types/factories/ERC165__factory.js +0 -41
- package/lib/types/factories/ERC20BlockingMock__factory.d.ts +0 -56
- package/lib/types/factories/ERC20BlockingMock__factory.js +0 -429
- package/lib/types/factories/ERC20__factory.d.ts +0 -56
- package/lib/types/factories/ERC20__factory.js +0 -339
- package/lib/types/factories/ERC721__factory.d.ts +0 -56
- package/lib/types/factories/ERC721__factory.js +0 -468
- package/lib/types/factories/Errors__factory.d.ts +0 -28
- package/lib/types/factories/Errors__factory.js +0 -1015
- package/lib/types/factories/ExecutorMock__factory.d.ts +0 -38
- package/lib/types/factories/ExecutorMock__factory.js +0 -103
- package/lib/types/factories/FlashLoanAttacker__factory.d.ts +0 -48
- package/lib/types/factories/FlashLoanAttacker__factory.js +0 -117
- package/lib/types/factories/FuzzHarness__factory.d.ts +0 -38
- package/lib/types/factories/FuzzHarness__factory.js +0 -92
- package/lib/types/factories/GearBeta__factory.d.ts +0 -52
- package/lib/types/factories/GearBeta__factory.js +0 -527
- package/lib/types/factories/GearToken__factory.d.ts +0 -56
- package/lib/types/factories/GearToken__factory.js +0 -708
- package/lib/types/factories/IAccountFactory__factory.d.ts +0 -35
- package/lib/types/factories/IAccountFactory__factory.js +0 -226
- package/lib/types/factories/IAccountMiner__factory.d.ts +0 -28
- package/lib/types/factories/IAccountMiner__factory.js +0 -48
- package/lib/types/factories/IAppAddressProvider__factory.d.ts +0 -18
- package/lib/types/factories/IAppAddressProvider__factory.js +0 -100
- package/lib/types/factories/IAppCreditManager__factory.d.ts +0 -42
- package/lib/types/factories/IAppCreditManager__factory.js +0 -204
- package/lib/types/factories/IAppERC20__factory.d.ts +0 -22
- package/lib/types/factories/IAppERC20__factory.js +0 -194
- package/lib/types/factories/IAppPoolService__factory.d.ts +0 -22
- package/lib/types/factories/IAppPoolService__factory.js +0 -69
- package/lib/types/factories/ICreditAccount__factory.d.ts +0 -22
- package/lib/types/factories/ICreditAccount__factory.js +0 -218
- package/lib/types/factories/ICreditFilter__factory.d.ts +0 -35
- package/lib/types/factories/ICreditFilter__factory.js +0 -700
- package/lib/types/factories/ICreditManager__factory.d.ts +0 -56
- package/lib/types/factories/ICreditManager__factory.js +0 -720
- package/lib/types/factories/ICurvePool__factory.d.ts +0 -22
- package/lib/types/factories/ICurvePool__factory.js +0 -168
- package/lib/types/factories/IDataCompressor__factory.d.ts +0 -51
- package/lib/types/factories/IDataCompressor__factory.js +0 -826
- package/lib/types/factories/IERC165__factory.d.ts +0 -22
- package/lib/types/factories/IERC165__factory.js +0 -41
- package/lib/types/factories/IERC20__factory.d.ts +0 -35
- package/lib/types/factories/IERC20__factory.js +0 -205
- package/lib/types/factories/IERC721Enumerable__factory.d.ts +0 -35
- package/lib/types/factories/IERC721Enumerable__factory.js +0 -363
- package/lib/types/factories/IERC721Metadata__factory.d.ts +0 -35
- package/lib/types/factories/IERC721Metadata__factory.js +0 -352
- package/lib/types/factories/IERC721Receiver__factory.d.ts +0 -22
- package/lib/types/factories/IERC721Receiver__factory.js +0 -56
- package/lib/types/factories/IERC721__factory.d.ts +0 -35
- package/lib/types/factories/IERC721__factory.js +0 -307
- package/lib/types/factories/IGearToken__factory.d.ts +0 -35
- package/lib/types/factories/IGearToken__factory.js +0 -342
- package/lib/types/factories/IInterestRateModel__factory.d.ts +0 -22
- package/lib/types/factories/IInterestRateModel__factory.js +0 -46
- package/lib/types/factories/IMerkleDistributor__factory.d.ts +0 -35
- package/lib/types/factories/IMerkleDistributor__factory.js +0 -109
- package/lib/types/factories/IPoolService__factory.d.ts +0 -35
- package/lib/types/factories/IPoolService__factory.js +0 -580
- package/lib/types/factories/IPriceOracle__factory.d.ts +0 -35
- package/lib/types/factories/IPriceOracle__factory.js +0 -112
- package/lib/types/factories/IQuoter__factory.d.ts +0 -22
- package/lib/types/factories/IQuoter__factory.js +0 -148
- package/lib/types/factories/ISwapRouter__factory.d.ts +0 -27
- package/lib/types/factories/ISwapRouter__factory.js +0 -236
- package/lib/types/factories/IUniswapV2Migrator__factory.d.ts +0 -18
- package/lib/types/factories/IUniswapV2Migrator__factory.js +0 -55
- package/lib/types/factories/IUniswapV2Router01__factory.d.ts +0 -22
- package/lib/types/factories/IUniswapV2Router01__factory.js +0 -771
- package/lib/types/factories/IUniswapV2Router02__factory.d.ts +0 -22
- package/lib/types/factories/IUniswapV2Router02__factory.js +0 -973
- package/lib/types/factories/IUniswapV3SwapCallback__factory.d.ts +0 -18
- package/lib/types/factories/IUniswapV3SwapCallback__factory.js +0 -45
- package/lib/types/factories/IWETHGateway__factory.d.ts +0 -18
- package/lib/types/factories/IWETHGateway__factory.js +0 -150
- package/lib/types/factories/IWETH__factory.d.ts +0 -22
- package/lib/types/factories/IWETH__factory.js +0 -66
- package/lib/types/factories/IYVault__factory.d.ts +0 -35
- package/lib/types/factories/IYVault__factory.js +0 -411
- package/lib/types/factories/LeveragedActions__factory.d.ts +0 -84
- package/lib/types/factories/LeveragedActions__factory.js +0 -569
- package/lib/types/factories/LinearInterestRateModel__factory.d.ts +0 -42
- package/lib/types/factories/LinearInterestRateModel__factory.js +0 -209
- package/lib/types/factories/MockPoolService__factory.d.ts +0 -56
- package/lib/types/factories/MockPoolService__factory.js +0 -889
- package/lib/types/factories/Multicall2__factory.d.ts +0 -52
- package/lib/types/factories/Multicall2__factory.js +0 -364
- package/lib/types/factories/Ownable__factory.d.ts +0 -42
- package/lib/types/factories/Ownable__factory.js +0 -74
- package/lib/types/factories/PathFinder__factory.d.ts +0 -61
- package/lib/types/factories/PathFinder__factory.js +0 -302
- package/lib/types/factories/Pausable__factory.d.ts +0 -31
- package/lib/types/factories/Pausable__factory.js +0 -61
- package/lib/types/factories/PercentageMathTest__factory.d.ts +0 -32
- package/lib/types/factories/PercentageMathTest__factory.js +0 -101
- package/lib/types/factories/PoolService__factory.d.ts +0 -56
- package/lib/types/factories/PoolService__factory.js +0 -873
- package/lib/types/factories/PriceOracle__factory.d.ts +0 -56
- package/lib/types/factories/PriceOracle__factory.js +0 -290
- package/lib/types/factories/StepVesting__factory.d.ts +0 -52
- package/lib/types/factories/StepVesting__factory.js +0 -296
- package/lib/types/factories/TestPoolService__factory.d.ts +0 -56
- package/lib/types/factories/TestPoolService__factory.js +0 -932
- package/lib/types/factories/TokenDistributor__factory.d.ts +0 -82
- package/lib/types/factories/TokenDistributor__factory.js +0 -481
- package/lib/types/factories/TokenFeeMock__factory.d.ts +0 -56
- package/lib/types/factories/TokenFeeMock__factory.js +0 -427
- package/lib/types/factories/TokenMock__factory.d.ts +0 -56
- package/lib/types/factories/TokenMock__factory.js +0 -409
- package/lib/types/factories/TreasuryMock__factory.d.ts +0 -35
- package/lib/types/factories/TreasuryMock__factory.js +0 -70
- package/lib/types/factories/UniswapRouterMock__factory.d.ts +0 -32
- package/lib/types/factories/UniswapRouterMock__factory.js +0 -1046
- package/lib/types/factories/UniswapV2Adapter__factory.d.ts +0 -42
- package/lib/types/factories/UniswapV2Adapter__factory.js +0 -1059
- package/lib/types/factories/UniswapV3Adapter__factory.d.ts +0 -47
- package/lib/types/factories/UniswapV3Adapter__factory.js +0 -322
- package/lib/types/factories/WETHGateway__factory.d.ts +0 -70
- package/lib/types/factories/WETHGateway__factory.js +0 -241
- package/lib/types/factories/WETHMock__factory.d.ts +0 -52
- package/lib/types/factories/WETHMock__factory.js +0 -355
- package/lib/types/factories/WadRayMathTest__factory.d.ts +0 -32
- package/lib/types/factories/WadRayMathTest__factory.js +0 -239
- package/lib/types/factories/YearnAdapter__factory.d.ts +0 -56
- package/lib/types/factories/YearnAdapter__factory.js +0 -497
- package/lib/types/factories/YearnMock__factory.d.ts +0 -56
- package/lib/types/factories/YearnMock__factory.js +0 -598
- package/lib/types/factories/YearnPriceFeed__factory.d.ts +0 -56
- package/lib/types/factories/YearnPriceFeed__factory.js +0 -350
- package/lib/types/factories/contracts/support/PathFinder__factory.d.ts +0 -63
- package/lib/types/factories/contracts/support/PathFinder__factory.js +0 -319
- package/lib/types/factories/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/ClaimZapFormatter__factory.d.ts +0 -34
- package/lib/types/factories/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/ClaimZapFormatter__factory.js +0 -124
- package/lib/types/factories/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/index.d.ts +0 -1
- package/lib/types/factories/contracts/test/mocks/integrations/ConvexClaimZapFormatter.sol/index.js +0 -8
package/lib/tokens/token.js
CHANGED
|
@@ -11,26 +11,13 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.tokenDataByAddress = exports.tokenDataByNetwork = exports.supportedTokens =
|
|
14
|
+
exports.tokenDataByAddress = exports.tokenDataByNetwork = exports.supportedTokens = void 0;
|
|
15
15
|
var mappers_1 = require("../utils/mappers");
|
|
16
16
|
var normal_1 = require("./normal");
|
|
17
17
|
var curveLP_1 = require("./curveLP");
|
|
18
18
|
var yearn_1 = require("./yearn");
|
|
19
19
|
var convex_1 = require("./convex");
|
|
20
20
|
var gear_1 = require("./gear");
|
|
21
|
-
var TokenType;
|
|
22
|
-
(function (TokenType) {
|
|
23
|
-
TokenType[TokenType["CONNECTOR"] = 0] = "CONNECTOR";
|
|
24
|
-
TokenType[TokenType["NORMAL_TOKEN"] = 1] = "NORMAL_TOKEN";
|
|
25
|
-
TokenType[TokenType["CURVE_LP"] = 2] = "CURVE_LP";
|
|
26
|
-
TokenType[TokenType["META_CURVE_LP"] = 3] = "META_CURVE_LP";
|
|
27
|
-
TokenType[TokenType["YEARN_VAULT"] = 4] = "YEARN_VAULT";
|
|
28
|
-
TokenType[TokenType["YEARN_VAULT_OF_CURVE_LP"] = 5] = "YEARN_VAULT_OF_CURVE_LP";
|
|
29
|
-
TokenType[TokenType["YEARN_VAULT_OF_META_CURVE_LP"] = 6] = "YEARN_VAULT_OF_META_CURVE_LP";
|
|
30
|
-
TokenType[TokenType["CONVEX_LP_TOKEN"] = 7] = "CONVEX_LP_TOKEN";
|
|
31
|
-
TokenType[TokenType["CONVEX_STAKED_PHANTOM_TOKEN"] = 8] = "CONVEX_STAKED_PHANTOM_TOKEN";
|
|
32
|
-
TokenType[TokenType["DIESEL_LP_TOKEN"] = 9] = "DIESEL_LP_TOKEN";
|
|
33
|
-
})(TokenType = exports.TokenType || (exports.TokenType = {}));
|
|
34
21
|
exports.supportedTokens = __assign(__assign(__assign(__assign(__assign({}, normal_1.normalTokens), curveLP_1.curveTokens), convex_1.convexTokens), yearn_1.yearnTokens), gear_1.gearTokens);
|
|
35
22
|
exports.tokenDataByNetwork = {
|
|
36
23
|
//
|
|
@@ -139,12 +126,12 @@ exports.tokenDataByNetwork = {
|
|
|
139
126
|
yvWETH: "0xB8f3CC38753db078b86e31647bE0A752cfd30A4b",
|
|
140
127
|
yvWBTC: "0x66359b29F7b142A3C7158e2F809aCD4407A6Ae75",
|
|
141
128
|
// CURVE LP TOKENS
|
|
142
|
-
"3Crv": "
|
|
143
|
-
steCRV: "",
|
|
144
|
-
FRAX3CRV: "",
|
|
145
|
-
LUSD3CRV: "",
|
|
146
|
-
crvPlain3andSUSD: "",
|
|
147
|
-
gusd3CRV: "",
|
|
129
|
+
"3Crv": "0x8eA3677599d5199c2c93c468fD2Fa6F102d3605b",
|
|
130
|
+
steCRV: "0x6636910D55D34505c08d53932Da526FB18D3869C",
|
|
131
|
+
FRAX3CRV: "0x76508F5398E50EFEC53d5Afd4B506990B43AdBFB",
|
|
132
|
+
LUSD3CRV: "0x04366d7ee3210B9eAd6f36696220d697b7885ED7",
|
|
133
|
+
crvPlain3andSUSD: "0x540f5ea2A0601e27368661CB231AE04c23A14C24",
|
|
134
|
+
gusd3CRV: "0x428A500D8209fef5a1b5a0A35C9412b71F03aAdA",
|
|
148
135
|
// CONVEX LP TOKENS
|
|
149
136
|
cvx3Crv: "",
|
|
150
137
|
cvxsteCRV: "",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum TokenType {
|
|
2
|
+
CONNECTOR = 0,
|
|
3
|
+
NORMAL_TOKEN = 1,
|
|
4
|
+
CURVE_LP = 2,
|
|
5
|
+
META_CURVE_LP = 3,
|
|
6
|
+
YEARN_VAULT = 4,
|
|
7
|
+
YEARN_VAULT_OF_CURVE_LP = 5,
|
|
8
|
+
YEARN_VAULT_OF_META_CURVE_LP = 6,
|
|
9
|
+
CONVEX_LP_TOKEN = 7,
|
|
10
|
+
CONVEX_STAKED_PHANTOM_TOKEN = 8,
|
|
11
|
+
DIESEL_LP_TOKEN = 9
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TokenType = void 0;
|
|
4
|
+
var TokenType;
|
|
5
|
+
(function (TokenType) {
|
|
6
|
+
TokenType[TokenType["CONNECTOR"] = 0] = "CONNECTOR";
|
|
7
|
+
TokenType[TokenType["NORMAL_TOKEN"] = 1] = "NORMAL_TOKEN";
|
|
8
|
+
TokenType[TokenType["CURVE_LP"] = 2] = "CURVE_LP";
|
|
9
|
+
TokenType[TokenType["META_CURVE_LP"] = 3] = "META_CURVE_LP";
|
|
10
|
+
TokenType[TokenType["YEARN_VAULT"] = 4] = "YEARN_VAULT";
|
|
11
|
+
TokenType[TokenType["YEARN_VAULT_OF_CURVE_LP"] = 5] = "YEARN_VAULT_OF_CURVE_LP";
|
|
12
|
+
TokenType[TokenType["YEARN_VAULT_OF_META_CURVE_LP"] = 6] = "YEARN_VAULT_OF_META_CURVE_LP";
|
|
13
|
+
TokenType[TokenType["CONVEX_LP_TOKEN"] = 7] = "CONVEX_LP_TOKEN";
|
|
14
|
+
TokenType[TokenType["CONVEX_STAKED_PHANTOM_TOKEN"] = 8] = "CONVEX_STAKED_PHANTOM_TOKEN";
|
|
15
|
+
TokenType[TokenType["DIESEL_LP_TOKEN"] = 9] = "DIESEL_LP_TOKEN";
|
|
16
|
+
})(TokenType = exports.TokenType || (exports.TokenType = {}));
|
package/lib/tokens/yearn.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TradeAction } from "../core/tradeTypes";
|
|
2
|
-
import { TokenBase
|
|
2
|
+
import { TokenBase } from "./token";
|
|
3
3
|
import { CurveLPToken } from "./curveLP";
|
|
4
4
|
import { NormalToken } from "./normal";
|
|
5
|
+
import { TokenType } from "./tokenType";
|
|
5
6
|
export declare type YearnLPToken = "yvDAI" | "yvUSDC" | "yvWETH" | "yvWBTC" | "yvCurve_stETH" | "yvCURVE_FRAX_POOL";
|
|
6
7
|
export declare type YearnVaultTokenData = {
|
|
7
8
|
symbol: YearnLPToken;
|
package/lib/tokens/yearn.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.yearnTokens = void 0;
|
|
4
4
|
var tradeTypes_1 = require("../core/tradeTypes");
|
|
5
|
-
var
|
|
5
|
+
var tokenType_1 = require("./tokenType");
|
|
6
6
|
exports.yearnTokens = {
|
|
7
7
|
// YEARN TOKENS
|
|
8
8
|
yvDAI: {
|
|
9
9
|
name: "yvDAI",
|
|
10
10
|
decimals: 18,
|
|
11
11
|
symbol: "yvDAI",
|
|
12
|
-
type:
|
|
12
|
+
type: tokenType_1.TokenType.YEARN_VAULT,
|
|
13
13
|
underlying: "DAI",
|
|
14
14
|
lpActions: [
|
|
15
15
|
{
|
|
@@ -23,7 +23,7 @@ exports.yearnTokens = {
|
|
|
23
23
|
name: "yvUSDC",
|
|
24
24
|
decimals: 6,
|
|
25
25
|
symbol: "yvUSDC",
|
|
26
|
-
type:
|
|
26
|
+
type: tokenType_1.TokenType.YEARN_VAULT,
|
|
27
27
|
underlying: "USDC",
|
|
28
28
|
lpActions: [
|
|
29
29
|
{
|
|
@@ -37,7 +37,7 @@ exports.yearnTokens = {
|
|
|
37
37
|
name: "yvWETH",
|
|
38
38
|
decimals: 18,
|
|
39
39
|
symbol: "yvWETH",
|
|
40
|
-
type:
|
|
40
|
+
type: tokenType_1.TokenType.YEARN_VAULT,
|
|
41
41
|
underlying: "WETH",
|
|
42
42
|
lpActions: [
|
|
43
43
|
{
|
|
@@ -51,7 +51,7 @@ exports.yearnTokens = {
|
|
|
51
51
|
name: "yvWBTC",
|
|
52
52
|
decimals: 8,
|
|
53
53
|
symbol: "yvWBTC",
|
|
54
|
-
type:
|
|
54
|
+
type: tokenType_1.TokenType.YEARN_VAULT,
|
|
55
55
|
underlying: "WBTC",
|
|
56
56
|
lpActions: [
|
|
57
57
|
{
|
|
@@ -66,7 +66,7 @@ exports.yearnTokens = {
|
|
|
66
66
|
name: "yvCurve-stETH",
|
|
67
67
|
decimals: 18,
|
|
68
68
|
symbol: "yvCurve_stETH",
|
|
69
|
-
type:
|
|
69
|
+
type: tokenType_1.TokenType.YEARN_VAULT_OF_CURVE_LP,
|
|
70
70
|
underlying: "steCRV",
|
|
71
71
|
lpActions: [
|
|
72
72
|
{
|
|
@@ -80,7 +80,7 @@ exports.yearnTokens = {
|
|
|
80
80
|
name: "yvCurve-FRAX",
|
|
81
81
|
decimals: 18,
|
|
82
82
|
symbol: "yvCURVE_FRAX_POOL",
|
|
83
|
-
type:
|
|
83
|
+
type: tokenType_1.TokenType.YEARN_VAULT_OF_META_CURVE_LP,
|
|
84
84
|
underlying: "FRAX3CRV",
|
|
85
85
|
lpActions: [
|
|
86
86
|
{
|
package/package.json
CHANGED
package/src/core/contracts.ts
CHANGED
|
@@ -84,7 +84,7 @@ export const contractsByNetwork: Record<NetworkType,
|
|
|
84
84
|
|
|
85
85
|
// LIDO
|
|
86
86
|
LIDO_STETH_GATEWAY: "0x55045Eaae19d92680E02231e4Ce7bBEB4814ca64",
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
},
|
|
89
89
|
Kovan: {
|
|
90
90
|
UNISWAP_V2_ROUTER: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
|
@@ -92,12 +92,12 @@ export const contractsByNetwork: Record<NetworkType,
|
|
|
92
92
|
SUSHISWAP_ROUTER: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",
|
|
93
93
|
|
|
94
94
|
// CURVE
|
|
95
|
-
CURVE_3CRV_POOL: "",
|
|
95
|
+
CURVE_3CRV_POOL: "0x5544FDA32B8F64262295DD0720A4D36BEB3F438c",
|
|
96
96
|
CURVE_STETH_GATEWAY: "",
|
|
97
|
-
CURVE_FRAX_POOL:
|
|
97
|
+
CURVE_FRAX_POOL: tokenDataByNetwork.Kovan.FRAX3CRV,
|
|
98
98
|
CURVE_LUSD_POOL: tokenDataByNetwork.Kovan.LUSD3CRV,
|
|
99
|
-
CURVE_SUSD_POOL: "", // SEPARATE TOKEN
|
|
100
|
-
CURVE_GUSD_POOL: "",
|
|
99
|
+
CURVE_SUSD_POOL: "0xf4fD22A7c99D389e4ddBb8185B59F9D6eF6775c0", // SEPARATE TOKEN
|
|
100
|
+
CURVE_GUSD_POOL: "0xeB9D96059bd466EBbd0E5EeBdD596566f31EbB7B",
|
|
101
101
|
|
|
102
102
|
// YEARN
|
|
103
103
|
YEARN_DAI_VAULT: tokenDataByNetwork.Kovan.yvDAI,
|
|
@@ -118,7 +118,7 @@ export const contractsByNetwork: Record<NetworkType,
|
|
|
118
118
|
CONVEX_CLAIM_ZAP: "",
|
|
119
119
|
|
|
120
120
|
// LIDO
|
|
121
|
-
LIDO_STETH_GATEWAY: "",
|
|
121
|
+
LIDO_STETH_GATEWAY: "0x0aaEB0372c2a32088D4F2c9a6ECfB3fFc7Fa2ffF",
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
}
|
package/src/index.ts
CHANGED
|
@@ -38,3 +38,4 @@ export {callRepeater} from "./utils/repeater";
|
|
|
38
38
|
export {getContractName} from "./core/contractsRegister";
|
|
39
39
|
export {AdapterInterface} from "./core/adapters";
|
|
40
40
|
export {objectEntries, swapKeyValue, keyToLowercase} from "./utils/mappers";
|
|
41
|
+
export {TokenType} from "./tokens/tokenType";
|
package/src/pathfinder/path.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {BigNumber, ethers} from "ethers";
|
|
2
2
|
import {CreditManagerData} from "../core/creditManager";
|
|
3
3
|
import {MultiCall} from "../core/multicall";
|
|
4
|
-
import {SupportedToken, supportedTokens
|
|
4
|
+
import {SupportedToken, supportedTokens} from "../tokens/token";
|
|
5
5
|
import {NetworkType} from "../core/constants";
|
|
6
6
|
import {CreditAccountData} from "../core/creditAccount";
|
|
7
7
|
|
|
@@ -15,6 +15,7 @@ import {CurveLPToken} from "../tokens/curveLP";
|
|
|
15
15
|
import {PartialRecord} from "../utils/types";
|
|
16
16
|
import {detectNetwork} from "../utils/network";
|
|
17
17
|
import {pathFindersByNetwork} from "./contracts";
|
|
18
|
+
import {TokenType} from "../tokens/tokenType";
|
|
18
19
|
|
|
19
20
|
export class Path {
|
|
20
21
|
public readonly calls: Array<MultiCall> = [];
|
|
@@ -191,5 +192,5 @@ export abstract class LPWithdrawPathFinder {
|
|
|
191
192
|
return {callData: call, amountOut: amountOut, gasLimit: gasLimit};
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
|
|
195
|
+
|
|
195
196
|
}
|
package/src/tokens/convex.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {TradeAction, TradeType} from "../core/tradeTypes";
|
|
2
|
-
import {TokenBase
|
|
2
|
+
import {TokenBase} from "./token";
|
|
3
3
|
import {ConvexPoolContract} from "../core/contracts";
|
|
4
4
|
import {CurveLPToken} from "./curveLP";
|
|
5
|
+
import {TokenType} from "./tokenType";
|
|
5
6
|
|
|
6
7
|
export type ConvexLPToken =
|
|
7
8
|
| "cvx3Crv"
|
package/src/tokens/curveLP.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {TradeAction, TradeType} from "../core/tradeTypes";
|
|
2
|
-
import {SupportedToken, TokenBase
|
|
2
|
+
import {SupportedToken, TokenBase} from "./token";
|
|
3
3
|
import {PartialRecord} from "../utils/types";
|
|
4
4
|
import {BigNumber} from "ethers";
|
|
5
|
+
import {TokenType} from "./tokenType";
|
|
5
6
|
|
|
6
7
|
export type CurveLPToken =
|
|
7
8
|
| "3Crv"
|
package/src/tokens/gear.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {TokenBase
|
|
1
|
+
import {TokenBase} from "./token";
|
|
2
2
|
import {TradeAction} from "../core/tradeTypes";
|
|
3
|
+
import {TokenType} from "./tokenType";
|
|
3
4
|
|
|
4
5
|
export type DieselTokenTypes = "dDAI" | "dUSDC" | "dWBTC" | "dWETH";
|
|
5
6
|
export type GearboxToken = "GEAR";
|
package/src/tokens/normal.ts
CHANGED
package/src/tokens/token.ts
CHANGED
|
@@ -18,19 +18,6 @@ import {
|
|
|
18
18
|
} from "./convex";
|
|
19
19
|
import {DieselTokenData, DieselTokenTypes, GearboxToken, GearboxTokenData, gearTokens} from "./gear";
|
|
20
20
|
|
|
21
|
-
export enum TokenType {
|
|
22
|
-
CONNECTOR,
|
|
23
|
-
NORMAL_TOKEN,
|
|
24
|
-
CURVE_LP,
|
|
25
|
-
META_CURVE_LP,
|
|
26
|
-
YEARN_VAULT,
|
|
27
|
-
YEARN_VAULT_OF_CURVE_LP,
|
|
28
|
-
YEARN_VAULT_OF_META_CURVE_LP,
|
|
29
|
-
CONVEX_LP_TOKEN,
|
|
30
|
-
CONVEX_STAKED_PHANTOM_TOKEN,
|
|
31
|
-
DIESEL_LP_TOKEN
|
|
32
|
-
}
|
|
33
|
-
|
|
34
21
|
|
|
35
22
|
export type SupportedToken =
|
|
36
23
|
| NormalToken
|
|
@@ -187,12 +174,12 @@ export const tokenDataByNetwork: Record<NetworkType,
|
|
|
187
174
|
yvWBTC: "0x66359b29F7b142A3C7158e2F809aCD4407A6Ae75",
|
|
188
175
|
|
|
189
176
|
// CURVE LP TOKENS
|
|
190
|
-
"3Crv": "
|
|
191
|
-
steCRV: "",
|
|
192
|
-
FRAX3CRV: "",
|
|
193
|
-
LUSD3CRV: "",
|
|
194
|
-
crvPlain3andSUSD: "",
|
|
195
|
-
gusd3CRV: "",
|
|
177
|
+
"3Crv": "0x8eA3677599d5199c2c93c468fD2Fa6F102d3605b",
|
|
178
|
+
steCRV: "0x6636910D55D34505c08d53932Da526FB18D3869C",
|
|
179
|
+
FRAX3CRV: "0x76508F5398E50EFEC53d5Afd4B506990B43AdBFB",
|
|
180
|
+
LUSD3CRV: "0x04366d7ee3210B9eAd6f36696220d697b7885ED7",
|
|
181
|
+
crvPlain3andSUSD: "0x540f5ea2A0601e27368661CB231AE04c23A14C24",
|
|
182
|
+
gusd3CRV: "0x428A500D8209fef5a1b5a0A35C9412b71F03aAdA",
|
|
196
183
|
|
|
197
184
|
// CONVEX LP TOKENS
|
|
198
185
|
cvx3Crv: "",
|
package/src/tokens/yearn.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {TradeAction, TradeType} from "../core/tradeTypes";
|
|
2
|
-
import {TokenBase
|
|
2
|
+
import {TokenBase} from "./token";
|
|
3
3
|
import {CurveLPToken} from "./curveLP";
|
|
4
4
|
import {NormalToken} from "./normal";
|
|
5
|
+
import {TokenType} from "./tokenType";
|
|
5
6
|
|
|
6
7
|
export type YearnLPToken =
|
|
7
8
|
| "yvDAI"
|
package/lib/core/pathfinder.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { BigNumber, ethers } from "ethers";
|
|
2
|
-
import { CreditManagerData } from "./creditManager";
|
|
3
|
-
import { MultiCall } from "./multicall";
|
|
4
|
-
import { SupportedToken } from "./token";
|
|
5
|
-
import { NetworkType } from "./constants";
|
|
6
|
-
import { CreditAccountData } from "./creditAccount";
|
|
7
|
-
export declare class Path {
|
|
8
|
-
readonly calls: Array<MultiCall>;
|
|
9
|
-
readonly balances: Record<SupportedToken, BigNumber>;
|
|
10
|
-
readonly pool: SupportedToken;
|
|
11
|
-
readonly creditManager: CreditManagerData;
|
|
12
|
-
readonly creditAccount: CreditAccountData;
|
|
13
|
-
readonly networkType: NetworkType;
|
|
14
|
-
readonly provider: ethers.providers.Provider;
|
|
15
|
-
readonly totalGasLimit: BigNumber;
|
|
16
|
-
constructor(opts: {
|
|
17
|
-
balances: Record<SupportedToken, BigNumber>;
|
|
18
|
-
pool: SupportedToken;
|
|
19
|
-
creditManager: CreditManagerData;
|
|
20
|
-
creditAccount: CreditAccountData;
|
|
21
|
-
networkType: NetworkType;
|
|
22
|
-
provider: ethers.providers.Provider;
|
|
23
|
-
totalGasLimit: BigNumber;
|
|
24
|
-
});
|
|
25
|
-
getBestPath(): Promise<Path>;
|
|
26
|
-
}
|
|
27
|
-
export interface PathAsset {
|
|
28
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
29
|
-
}
|
|
30
|
-
export declare class ConnectorPathAsset implements PathAsset {
|
|
31
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
32
|
-
getMaxPoolAmount(currentToken: SupportedToken, currentBalance: BigNumber, p: Path): Promise<[BigNumber, BigNumber]>;
|
|
33
|
-
}
|
|
34
|
-
export declare class YearnVaultPathAsset implements PathAsset {
|
|
35
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
36
|
-
}
|
|
37
|
-
export declare class ConvexLPTokenPathAsset implements PathAsset {
|
|
38
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
39
|
-
}
|
|
40
|
-
export declare class CurveLPPathAsset implements PathAsset {
|
|
41
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
42
|
-
}
|
|
43
|
-
export declare class MetaCurveLPPathAsset implements PathAsset {
|
|
44
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
45
|
-
}
|
|
46
|
-
export declare class NormalTokenPathAsset implements PathAsset {
|
|
47
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
48
|
-
}
|
|
49
|
-
export declare class YearnVaultOfCurveLPPathAsset implements PathAsset {
|
|
50
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
51
|
-
}
|
|
52
|
-
export declare class YearnVaultOfMetaCurveLPPathAsset implements PathAsset {
|
|
53
|
-
getBestPath(currentToken: SupportedToken, p: Path): Promise<Path>;
|
|
54
|
-
}
|