@gearbox-protocol/sdk 0.0.59 → 0.0.62
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 +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 +1 -14
- 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/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 +0 -13
- 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/index.d.ts
CHANGED
|
@@ -36,3 +36,4 @@ export { callRepeater } from "./utils/repeater";
|
|
|
36
36
|
export { getContractName } from "./core/contractsRegister";
|
|
37
37
|
export { AdapterInterface } from "./core/adapters";
|
|
38
38
|
export { objectEntries, swapKeyValue, keyToLowercase } from "./utils/mappers";
|
|
39
|
+
export { TokenType } from "./tokens/tokenType";
|
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.keyToLowercase = exports.swapKeyValue = exports.objectEntries = exports.AdapterInterface = exports.getContractName = exports.callRepeater = exports.MultiCallContract = void 0;
|
|
17
|
+
exports.TokenType = exports.keyToLowercase = exports.swapKeyValue = exports.objectEntries = exports.AdapterInterface = exports.getContractName = exports.callRepeater = exports.MultiCallContract = void 0;
|
|
18
18
|
__exportStar(require("./core/constants"), exports);
|
|
19
19
|
__exportStar(require("./core/creditAccount"), exports);
|
|
20
20
|
__exportStar(require("./core/creditManager"), exports);
|
|
@@ -59,3 +59,5 @@ var mappers_1 = require("./utils/mappers");
|
|
|
59
59
|
Object.defineProperty(exports, "objectEntries", { enumerable: true, get: function () { return mappers_1.objectEntries; } });
|
|
60
60
|
Object.defineProperty(exports, "swapKeyValue", { enumerable: true, get: function () { return mappers_1.swapKeyValue; } });
|
|
61
61
|
Object.defineProperty(exports, "keyToLowercase", { enumerable: true, get: function () { return mappers_1.keyToLowercase; } });
|
|
62
|
+
var tokenType_1 = require("./tokens/tokenType");
|
|
63
|
+
Object.defineProperty(exports, "TokenType", { enumerable: true, get: function () { return tokenType_1.TokenType; } });
|
package/lib/pathfinder/path.js
CHANGED
|
@@ -46,6 +46,7 @@ var convexLP_1 = require("./convexLP");
|
|
|
46
46
|
var curveLP_1 = require("./curveLP");
|
|
47
47
|
var network_1 = require("../utils/network");
|
|
48
48
|
var contracts_1 = require("./contracts");
|
|
49
|
+
var tokenType_1 = require("../tokens/tokenType");
|
|
49
50
|
var Path = /** @class */ (function () {
|
|
50
51
|
function Path(opts) {
|
|
51
52
|
this.calls = [];
|
|
@@ -125,19 +126,19 @@ var Path = /** @class */ (function () {
|
|
|
125
126
|
// Find token with highest priority
|
|
126
127
|
// Get token type of this token
|
|
127
128
|
switch (token_1.supportedTokens[nextToken].type) {
|
|
128
|
-
case
|
|
129
|
-
case
|
|
129
|
+
case tokenType_1.TokenType.NORMAL_TOKEN:
|
|
130
|
+
case tokenType_1.TokenType.CONNECTOR:
|
|
130
131
|
return [2 /*return*/, [this]];
|
|
131
|
-
case
|
|
132
|
-
case
|
|
133
|
-
case
|
|
132
|
+
case tokenType_1.TokenType.YEARN_VAULT_OF_CURVE_LP:
|
|
133
|
+
case tokenType_1.TokenType.YEARN_VAULT_OF_META_CURVE_LP:
|
|
134
|
+
case tokenType_1.TokenType.YEARN_VAULT:
|
|
134
135
|
lpPathFinder = new yVault_1.YearnVaultPathFinder(nextToken);
|
|
135
136
|
break;
|
|
136
|
-
case
|
|
137
|
+
case tokenType_1.TokenType.CONVEX_LP_TOKEN:
|
|
137
138
|
lpPathFinder = new convexLP_1.ConvexLPPathFinder();
|
|
138
139
|
break;
|
|
139
|
-
case
|
|
140
|
-
case
|
|
140
|
+
case tokenType_1.TokenType.META_CURVE_LP:
|
|
141
|
+
case tokenType_1.TokenType.CURVE_LP:
|
|
141
142
|
lpPathFinder = new curveLP_1.CurvePathFinder(nextToken);
|
|
142
143
|
break;
|
|
143
144
|
default:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TokenType } from "../tokens/
|
|
1
|
+
import { TokenType } from "../tokens/tokenType";
|
|
2
2
|
export declare const priority: Record<TokenType, number>;
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.priority = void 0;
|
|
5
|
-
var
|
|
5
|
+
var tokenType_1 = require("../tokens/tokenType");
|
|
6
6
|
exports.priority = (_a = {},
|
|
7
|
-
_a[
|
|
8
|
-
_a[
|
|
9
|
-
_a[
|
|
10
|
-
_a[
|
|
11
|
-
_a[
|
|
12
|
-
_a[
|
|
13
|
-
_a[
|
|
14
|
-
_a[
|
|
15
|
-
_a[
|
|
16
|
-
_a[
|
|
7
|
+
_a[tokenType_1.TokenType.CONNECTOR] = 1,
|
|
8
|
+
_a[tokenType_1.TokenType.NORMAL_TOKEN] = 2,
|
|
9
|
+
_a[tokenType_1.TokenType.CURVE_LP] = 3,
|
|
10
|
+
_a[tokenType_1.TokenType.YEARN_VAULT] = 3,
|
|
11
|
+
_a[tokenType_1.TokenType.META_CURVE_LP] = 4,
|
|
12
|
+
_a[tokenType_1.TokenType.YEARN_VAULT_OF_CURVE_LP] = 4,
|
|
13
|
+
_a[tokenType_1.TokenType.CONVEX_LP_TOKEN] = 5,
|
|
14
|
+
_a[tokenType_1.TokenType.YEARN_VAULT_OF_META_CURVE_LP] = 5,
|
|
15
|
+
_a[tokenType_1.TokenType.CONVEX_STAKED_PHANTOM_TOKEN] = 5,
|
|
16
|
+
_a[tokenType_1.TokenType.DIESEL_LP_TOKEN] = 6,
|
|
17
17
|
_a);
|
package/lib/tokens/convex.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 { ConvexPoolContract } from "../core/contracts";
|
|
4
4
|
import { CurveLPToken } from "./curveLP";
|
|
5
|
+
import { TokenType } from "./tokenType";
|
|
5
6
|
export declare type ConvexLPToken = "cvx3Crv" | "cvxsteCRV" | "cvxFRAX3CRV" | "cvxcrvPlain3andSUSD" | "cvxgusd3CRV";
|
|
6
7
|
export declare type ConvexStakedPhantomToken = "stkcvx3Crv" | "stkcvxsteCRV" | "stkcvxFRAX3CRV" | "stkcvxcrvPlain3andSUSD" | "stkcvxgusd3CRV";
|
|
7
8
|
declare type BaseConvexToken = {
|
package/lib/tokens/convex.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convexTokens = void 0;
|
|
4
4
|
var tradeTypes_1 = require("../core/tradeTypes");
|
|
5
|
-
var
|
|
5
|
+
var tokenType_1 = require("./tokenType");
|
|
6
6
|
exports.convexTokens = {
|
|
7
7
|
// CONVEX LP TOKENS
|
|
8
8
|
cvx3Crv: {
|
|
9
9
|
name: "cvx3Crv",
|
|
10
10
|
decimals: 18,
|
|
11
11
|
symbol: "cvx3Crv",
|
|
12
|
-
type:
|
|
12
|
+
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
13
13
|
pool: "CONVEX_3CRV_POOL",
|
|
14
14
|
pid: 0,
|
|
15
15
|
underlying: "3Crv",
|
|
@@ -31,7 +31,7 @@ exports.convexTokens = {
|
|
|
31
31
|
name: "cvxsteCRV",
|
|
32
32
|
decimals: 18,
|
|
33
33
|
symbol: "cvxsteCRV",
|
|
34
|
-
type:
|
|
34
|
+
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
35
35
|
pool: "CONVEX_STECRV_POOL",
|
|
36
36
|
pid: 0,
|
|
37
37
|
underlying: "steCRV",
|
|
@@ -53,7 +53,7 @@ exports.convexTokens = {
|
|
|
53
53
|
name: "cvxFRAX3CRV-f",
|
|
54
54
|
decimals: 18,
|
|
55
55
|
symbol: "cvxFRAX3CRV",
|
|
56
|
-
type:
|
|
56
|
+
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
57
57
|
pool: "CONVEX_FRAX3CRV_POOL",
|
|
58
58
|
pid: 0,
|
|
59
59
|
underlying: "FRAX3CRV",
|
|
@@ -75,7 +75,7 @@ exports.convexTokens = {
|
|
|
75
75
|
name: "cvxcrvPlain3andSUSD",
|
|
76
76
|
decimals: 18,
|
|
77
77
|
symbol: "cvxcrvPlain3andSUSD",
|
|
78
|
-
type:
|
|
78
|
+
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
79
79
|
pool: "CONVEX_SUSD_POOL",
|
|
80
80
|
pid: 0,
|
|
81
81
|
underlying: "crvPlain3andSUSD",
|
|
@@ -97,7 +97,7 @@ exports.convexTokens = {
|
|
|
97
97
|
name: "cvxgusd3CRV",
|
|
98
98
|
decimals: 18,
|
|
99
99
|
symbol: "cvxgusd3CRV",
|
|
100
|
-
type:
|
|
100
|
+
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
101
101
|
pool: "CONVEX_GUSD_POOL",
|
|
102
102
|
pid: 0,
|
|
103
103
|
underlying: "gusd3CRV",
|
|
@@ -120,7 +120,7 @@ exports.convexTokens = {
|
|
|
120
120
|
name: "stkcvx3Crv",
|
|
121
121
|
decimals: 18,
|
|
122
122
|
symbol: "stkcvx3Crv",
|
|
123
|
-
type:
|
|
123
|
+
type: tokenType_1.TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
|
|
124
124
|
pool: "CONVEX_3CRV_POOL",
|
|
125
125
|
pid: 0,
|
|
126
126
|
underlying: "3Crv",
|
|
@@ -142,7 +142,7 @@ exports.convexTokens = {
|
|
|
142
142
|
name: "stkcvxsteCRV",
|
|
143
143
|
decimals: 18,
|
|
144
144
|
symbol: "stkcvxsteCRV",
|
|
145
|
-
type:
|
|
145
|
+
type: tokenType_1.TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
|
|
146
146
|
pool: "CONVEX_STECRV_POOL",
|
|
147
147
|
pid: 0,
|
|
148
148
|
underlying: "steCRV",
|
|
@@ -164,7 +164,7 @@ exports.convexTokens = {
|
|
|
164
164
|
name: "stkcvxFRAX3CRV-f",
|
|
165
165
|
decimals: 18,
|
|
166
166
|
symbol: "stkcvxFRAX3CRV",
|
|
167
|
-
type:
|
|
167
|
+
type: tokenType_1.TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
|
|
168
168
|
pool: "CONVEX_FRAX3CRV_POOL",
|
|
169
169
|
pid: 0,
|
|
170
170
|
underlying: "FRAX3CRV",
|
|
@@ -186,7 +186,7 @@ exports.convexTokens = {
|
|
|
186
186
|
name: "stkcvxcrvPlain3andSUSD",
|
|
187
187
|
decimals: 18,
|
|
188
188
|
symbol: "stkcvxcrvPlain3andSUSD",
|
|
189
|
-
type:
|
|
189
|
+
type: tokenType_1.TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
|
|
190
190
|
pool: "CONVEX_SUSD_POOL",
|
|
191
191
|
pid: 0,
|
|
192
192
|
underlying: "crvPlain3andSUSD",
|
|
@@ -208,7 +208,7 @@ exports.convexTokens = {
|
|
|
208
208
|
name: "stkcvxgusd3CRV",
|
|
209
209
|
decimals: 18,
|
|
210
210
|
symbol: "stkcvxgusd3CRV",
|
|
211
|
-
type:
|
|
211
|
+
type: tokenType_1.TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
|
|
212
212
|
pool: "CONVEX_GUSD_POOL",
|
|
213
213
|
pid: 0,
|
|
214
214
|
underlying: "gusd3CRV",
|
package/lib/tokens/curveLP.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TradeAction } 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
|
export declare type CurveLPToken = "3Crv" | "steCRV" | "FRAX3CRV" | "LUSD3CRV" | "crvPlain3andSUSD" | "gusd3CRV";
|
|
6
7
|
export declare type CurveLPTokenData = {
|
|
7
8
|
symbol: CurveLPToken;
|
package/lib/tokens/curveLP.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.curveTokens = exports.Curve3CrvUnderlyingTokenIndex = void 0;
|
|
4
4
|
var tradeTypes_1 = require("../core/tradeTypes");
|
|
5
|
-
var token_1 = require("./token");
|
|
6
5
|
var ethers_1 = require("ethers");
|
|
6
|
+
var tokenType_1 = require("./tokenType");
|
|
7
7
|
exports.Curve3CrvUnderlyingTokenIndex = {
|
|
8
8
|
DAI: ethers_1.BigNumber.from(0),
|
|
9
9
|
USDC: ethers_1.BigNumber.from(1),
|
|
@@ -15,7 +15,7 @@ exports.curveTokens = {
|
|
|
15
15
|
name: "3Crv",
|
|
16
16
|
decimals: 18,
|
|
17
17
|
symbol: "3Crv",
|
|
18
|
-
type:
|
|
18
|
+
type: tokenType_1.TokenType.CURVE_LP,
|
|
19
19
|
lpActions: [
|
|
20
20
|
{
|
|
21
21
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
@@ -38,7 +38,7 @@ exports.curveTokens = {
|
|
|
38
38
|
name: "steCRV",
|
|
39
39
|
decimals: 18,
|
|
40
40
|
symbol: "steCRV",
|
|
41
|
-
type:
|
|
41
|
+
type: tokenType_1.TokenType.CURVE_LP,
|
|
42
42
|
lpActions: [
|
|
43
43
|
{
|
|
44
44
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
@@ -61,7 +61,7 @@ exports.curveTokens = {
|
|
|
61
61
|
name: "crvPlain3andSUSD",
|
|
62
62
|
decimals: 18,
|
|
63
63
|
symbol: "crvPlain3andSUSD",
|
|
64
|
-
type:
|
|
64
|
+
type: tokenType_1.TokenType.CURVE_LP,
|
|
65
65
|
lpActions: [
|
|
66
66
|
{
|
|
67
67
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
@@ -85,7 +85,7 @@ exports.curveTokens = {
|
|
|
85
85
|
name: "FRAX3CRV-f",
|
|
86
86
|
decimals: 18,
|
|
87
87
|
symbol: "FRAX3CRV",
|
|
88
|
-
type:
|
|
88
|
+
type: tokenType_1.TokenType.META_CURVE_LP,
|
|
89
89
|
lpActions: [
|
|
90
90
|
{
|
|
91
91
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
@@ -108,7 +108,7 @@ exports.curveTokens = {
|
|
|
108
108
|
name: "LUSD3CRV-f",
|
|
109
109
|
decimals: 18,
|
|
110
110
|
symbol: "LUSD3CRV",
|
|
111
|
-
type:
|
|
111
|
+
type: tokenType_1.TokenType.META_CURVE_LP,
|
|
112
112
|
lpActions: [
|
|
113
113
|
{
|
|
114
114
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
@@ -121,7 +121,7 @@ exports.curveTokens = {
|
|
|
121
121
|
name: "gusd3CRV",
|
|
122
122
|
decimals: 18,
|
|
123
123
|
symbol: "gusd3CRV",
|
|
124
|
-
type:
|
|
124
|
+
type: tokenType_1.TokenType.META_CURVE_LP,
|
|
125
125
|
lpActions: [
|
|
126
126
|
{
|
|
127
127
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
package/lib/tokens/gear.d.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
|
export declare type DieselTokenTypes = "dDAI" | "dUSDC" | "dWBTC" | "dWETH";
|
|
4
5
|
export declare type GearboxToken = "GEAR";
|
|
5
6
|
export declare type DieselTokenData = {
|
package/lib/tokens/gear.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.gearTokens = void 0;
|
|
4
|
-
var
|
|
4
|
+
var tokenType_1 = require("./tokenType");
|
|
5
5
|
exports.gearTokens = {
|
|
6
6
|
//GEARBOX
|
|
7
7
|
dDAI: {
|
|
8
8
|
name: "dDAI",
|
|
9
9
|
decimals: 18,
|
|
10
10
|
symbol: "dDAI",
|
|
11
|
-
type:
|
|
11
|
+
type: tokenType_1.TokenType.DIESEL_LP_TOKEN
|
|
12
12
|
},
|
|
13
13
|
dUSDC: {
|
|
14
14
|
name: "dUSDC",
|
|
15
15
|
decimals: 6,
|
|
16
16
|
symbol: "dUSDC",
|
|
17
|
-
type:
|
|
17
|
+
type: tokenType_1.TokenType.DIESEL_LP_TOKEN
|
|
18
18
|
},
|
|
19
19
|
dWBTC: {
|
|
20
20
|
name: "dWBTC",
|
|
21
21
|
decimals: 8,
|
|
22
22
|
symbol: "dWBTC",
|
|
23
|
-
type:
|
|
23
|
+
type: tokenType_1.TokenType.DIESEL_LP_TOKEN
|
|
24
24
|
},
|
|
25
25
|
dWETH: {
|
|
26
26
|
name: "dWETH",
|
|
27
27
|
decimals: 18,
|
|
28
28
|
symbol: "dWETH",
|
|
29
|
-
type:
|
|
29
|
+
type: tokenType_1.TokenType.DIESEL_LP_TOKEN
|
|
30
30
|
},
|
|
31
31
|
GEAR: {
|
|
32
32
|
name: "GEAR",
|
|
33
33
|
decimals: 18,
|
|
34
34
|
symbol: "GEAR",
|
|
35
|
-
type:
|
|
35
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN
|
|
36
36
|
}
|
|
37
37
|
};
|
package/lib/tokens/normal.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TradeAction } from "../core/tradeTypes";
|
|
2
|
-
import { TokenBase
|
|
2
|
+
import { TokenBase } from "./token";
|
|
3
|
+
import { TokenType } from "./tokenType";
|
|
3
4
|
export declare type NormalToken = "1INCH" | "AAVE" | "COMP" | "CRV" | "DPI" | "FEI" | "LINK" | "SNX" | "SUSHI" | "UNI" | "USDT" | "USDC" | "DAI" | "WETH" | "WBTC" | "YFI" | "STETH" | "FTM" | "CVX" | "FRAX" | "FXS" | "LDO" | "SPELL" | "LUSD" | "sUSD" | "GUSD" | "LUNA" | "LQTY";
|
|
4
5
|
export declare type NormalTokenData = {
|
|
5
6
|
symbol: NormalToken;
|
package/lib/tokens/normal.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalTokens = void 0;
|
|
4
4
|
var tradeTypes_1 = require("../core/tradeTypes");
|
|
5
|
-
var
|
|
5
|
+
var tokenType_1 = require("./tokenType");
|
|
6
6
|
exports.normalTokens = {
|
|
7
7
|
"1INCH": {
|
|
8
8
|
name: "1INCH",
|
|
9
9
|
decimals: 18,
|
|
10
10
|
symbol: "1INCH",
|
|
11
|
-
type:
|
|
11
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
12
12
|
swapActions: [
|
|
13
13
|
{
|
|
14
14
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -28,7 +28,7 @@ exports.normalTokens = {
|
|
|
28
28
|
name: "AAVE",
|
|
29
29
|
decimals: 18,
|
|
30
30
|
symbol: "AAVE",
|
|
31
|
-
type:
|
|
31
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
32
32
|
swapActions: [
|
|
33
33
|
{
|
|
34
34
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -48,7 +48,7 @@ exports.normalTokens = {
|
|
|
48
48
|
name: "COMP",
|
|
49
49
|
decimals: 18,
|
|
50
50
|
symbol: "COMP",
|
|
51
|
-
type:
|
|
51
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
52
52
|
swapActions: [
|
|
53
53
|
{
|
|
54
54
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -68,7 +68,7 @@ exports.normalTokens = {
|
|
|
68
68
|
name: "CRV",
|
|
69
69
|
decimals: 18,
|
|
70
70
|
symbol: "CRV",
|
|
71
|
-
type:
|
|
71
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
72
72
|
swapActions: [
|
|
73
73
|
{
|
|
74
74
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -88,7 +88,7 @@ exports.normalTokens = {
|
|
|
88
88
|
name: "DAI",
|
|
89
89
|
decimals: 18,
|
|
90
90
|
symbol: "DAI",
|
|
91
|
-
type:
|
|
91
|
+
type: tokenType_1.TokenType.CONNECTOR,
|
|
92
92
|
swapActions: [
|
|
93
93
|
{
|
|
94
94
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -135,7 +135,7 @@ exports.normalTokens = {
|
|
|
135
135
|
name: "DPI",
|
|
136
136
|
decimals: 18,
|
|
137
137
|
symbol: "DPI",
|
|
138
|
-
type:
|
|
138
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
139
139
|
swapActions: [
|
|
140
140
|
{
|
|
141
141
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -155,7 +155,7 @@ exports.normalTokens = {
|
|
|
155
155
|
name: "FEI",
|
|
156
156
|
decimals: 18,
|
|
157
157
|
symbol: "FEI",
|
|
158
|
-
type:
|
|
158
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
159
159
|
swapActions: [
|
|
160
160
|
{
|
|
161
161
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -175,7 +175,7 @@ exports.normalTokens = {
|
|
|
175
175
|
name: "LINK",
|
|
176
176
|
decimals: 18,
|
|
177
177
|
symbol: "LINK",
|
|
178
|
-
type:
|
|
178
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
179
179
|
swapActions: [
|
|
180
180
|
{
|
|
181
181
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -195,7 +195,7 @@ exports.normalTokens = {
|
|
|
195
195
|
name: "SNX",
|
|
196
196
|
decimals: 18,
|
|
197
197
|
symbol: "SNX",
|
|
198
|
-
type:
|
|
198
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
199
199
|
swapActions: [
|
|
200
200
|
{
|
|
201
201
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -215,7 +215,7 @@ exports.normalTokens = {
|
|
|
215
215
|
name: "SUSHI",
|
|
216
216
|
decimals: 18,
|
|
217
217
|
symbol: "SUSHI",
|
|
218
|
-
type:
|
|
218
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
219
219
|
swapActions: [
|
|
220
220
|
{
|
|
221
221
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
@@ -227,7 +227,7 @@ exports.normalTokens = {
|
|
|
227
227
|
name: "UNI",
|
|
228
228
|
decimals: 18,
|
|
229
229
|
symbol: "UNI",
|
|
230
|
-
type:
|
|
230
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
231
231
|
swapActions: [
|
|
232
232
|
{
|
|
233
233
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -243,7 +243,7 @@ exports.normalTokens = {
|
|
|
243
243
|
name: "USDC",
|
|
244
244
|
decimals: 6,
|
|
245
245
|
symbol: "USDC",
|
|
246
|
-
type:
|
|
246
|
+
type: tokenType_1.TokenType.CONNECTOR,
|
|
247
247
|
swapActions: [
|
|
248
248
|
{
|
|
249
249
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -290,7 +290,7 @@ exports.normalTokens = {
|
|
|
290
290
|
name: "USDT",
|
|
291
291
|
decimals: 6,
|
|
292
292
|
symbol: "USDT",
|
|
293
|
-
type:
|
|
293
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
294
294
|
swapActions: [
|
|
295
295
|
{
|
|
296
296
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -332,7 +332,7 @@ exports.normalTokens = {
|
|
|
332
332
|
name: "WBTC",
|
|
333
333
|
decimals: 8,
|
|
334
334
|
symbol: "WBTC",
|
|
335
|
-
type:
|
|
335
|
+
type: tokenType_1.TokenType.CONNECTOR,
|
|
336
336
|
swapActions: [
|
|
337
337
|
{
|
|
338
338
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -359,7 +359,7 @@ exports.normalTokens = {
|
|
|
359
359
|
name: "WETH",
|
|
360
360
|
decimals: 18,
|
|
361
361
|
symbol: "WETH",
|
|
362
|
-
type:
|
|
362
|
+
type: tokenType_1.TokenType.CONNECTOR,
|
|
363
363
|
swapActions: [
|
|
364
364
|
{
|
|
365
365
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -396,7 +396,7 @@ exports.normalTokens = {
|
|
|
396
396
|
name: "YFI",
|
|
397
397
|
decimals: 18,
|
|
398
398
|
symbol: "YFI",
|
|
399
|
-
type:
|
|
399
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
400
400
|
swapActions: [
|
|
401
401
|
{
|
|
402
402
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -417,7 +417,7 @@ exports.normalTokens = {
|
|
|
417
417
|
name: "stETH",
|
|
418
418
|
decimals: 18,
|
|
419
419
|
symbol: "STETH",
|
|
420
|
-
type:
|
|
420
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
421
421
|
swapActions: [
|
|
422
422
|
{
|
|
423
423
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -449,7 +449,7 @@ exports.normalTokens = {
|
|
|
449
449
|
name: "FTM",
|
|
450
450
|
decimals: 18,
|
|
451
451
|
symbol: "FTM",
|
|
452
|
-
type:
|
|
452
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
453
453
|
swapActions: [
|
|
454
454
|
{
|
|
455
455
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -469,7 +469,7 @@ exports.normalTokens = {
|
|
|
469
469
|
name: "CVX",
|
|
470
470
|
decimals: 18,
|
|
471
471
|
symbol: "CVX",
|
|
472
|
-
type:
|
|
472
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
473
473
|
swapActions: [
|
|
474
474
|
{
|
|
475
475
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -489,7 +489,7 @@ exports.normalTokens = {
|
|
|
489
489
|
name: "FRAX",
|
|
490
490
|
decimals: 18,
|
|
491
491
|
symbol: "FRAX",
|
|
492
|
-
type:
|
|
492
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
493
493
|
swapActions: [
|
|
494
494
|
{
|
|
495
495
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -521,7 +521,7 @@ exports.normalTokens = {
|
|
|
521
521
|
name: "FXS",
|
|
522
522
|
decimals: 18,
|
|
523
523
|
symbol: "FXS",
|
|
524
|
-
type:
|
|
524
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
525
525
|
swapActions: [
|
|
526
526
|
{
|
|
527
527
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -541,7 +541,7 @@ exports.normalTokens = {
|
|
|
541
541
|
name: "LDO",
|
|
542
542
|
decimals: 18,
|
|
543
543
|
symbol: "LDO",
|
|
544
|
-
type:
|
|
544
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
545
545
|
swapActions: [
|
|
546
546
|
{
|
|
547
547
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -561,7 +561,7 @@ exports.normalTokens = {
|
|
|
561
561
|
name: "SPELL",
|
|
562
562
|
decimals: 18,
|
|
563
563
|
symbol: "SPELL",
|
|
564
|
-
type:
|
|
564
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
565
565
|
swapActions: [
|
|
566
566
|
{
|
|
567
567
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -581,7 +581,7 @@ exports.normalTokens = {
|
|
|
581
581
|
name: "LUSD",
|
|
582
582
|
decimals: 18,
|
|
583
583
|
symbol: "LUSD",
|
|
584
|
-
type:
|
|
584
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
585
585
|
swapActions: [
|
|
586
586
|
{
|
|
587
587
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -613,7 +613,7 @@ exports.normalTokens = {
|
|
|
613
613
|
name: "sUSD",
|
|
614
614
|
decimals: 18,
|
|
615
615
|
symbol: "sUSD",
|
|
616
|
-
type:
|
|
616
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
617
617
|
swapActions: [
|
|
618
618
|
{
|
|
619
619
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -645,7 +645,7 @@ exports.normalTokens = {
|
|
|
645
645
|
name: "GUSD",
|
|
646
646
|
decimals: 18,
|
|
647
647
|
symbol: "GUSD",
|
|
648
|
-
type:
|
|
648
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
649
649
|
swapActions: [
|
|
650
650
|
{
|
|
651
651
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -677,7 +677,7 @@ exports.normalTokens = {
|
|
|
677
677
|
name: "LUNA",
|
|
678
678
|
decimals: 18,
|
|
679
679
|
symbol: "LUNA",
|
|
680
|
-
type:
|
|
680
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
681
681
|
swapActions: [
|
|
682
682
|
{
|
|
683
683
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
@@ -697,7 +697,7 @@ exports.normalTokens = {
|
|
|
697
697
|
name: "LQTY",
|
|
698
698
|
decimals: 18,
|
|
699
699
|
symbol: "LQTY",
|
|
700
|
-
type:
|
|
700
|
+
type: tokenType_1.TokenType.NORMAL_TOKEN,
|
|
701
701
|
swapActions: [
|
|
702
702
|
{
|
|
703
703
|
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
package/lib/tokens/token.d.ts
CHANGED
|
@@ -4,18 +4,6 @@ import { CurveLPToken, CurveLPTokenData, MetaCurveLPTokenData } from "./curveLP"
|
|
|
4
4
|
import { YearnLPToken, YearnVaultOfCurveLPTokenData, YearnVaultOfMetaCurveLPTokenData, YearnVaultTokenData } from "./yearn";
|
|
5
5
|
import { ConvexLPToken, ConvexLPTokenData, ConvexPhantomTokenData, ConvexStakedPhantomToken } from "./convex";
|
|
6
6
|
import { DieselTokenData, DieselTokenTypes, GearboxToken, GearboxTokenData } from "./gear";
|
|
7
|
-
export declare enum TokenType {
|
|
8
|
-
CONNECTOR = 0,
|
|
9
|
-
NORMAL_TOKEN = 1,
|
|
10
|
-
CURVE_LP = 2,
|
|
11
|
-
META_CURVE_LP = 3,
|
|
12
|
-
YEARN_VAULT = 4,
|
|
13
|
-
YEARN_VAULT_OF_CURVE_LP = 5,
|
|
14
|
-
YEARN_VAULT_OF_META_CURVE_LP = 6,
|
|
15
|
-
CONVEX_LP_TOKEN = 7,
|
|
16
|
-
CONVEX_STAKED_PHANTOM_TOKEN = 8,
|
|
17
|
-
DIESEL_LP_TOKEN = 9
|
|
18
|
-
}
|
|
19
7
|
export declare type SupportedToken = NormalToken | YearnLPToken | CurveLPToken | ConvexLPToken | ConvexStakedPhantomToken | DieselTokenTypes | GearboxToken;
|
|
20
8
|
export interface TokenBase {
|
|
21
9
|
name: string;
|
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
|
//
|
|
@@ -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 = {}));
|