@gearbox-protocol/sdk 3.0.0-next.19 → 3.0.0-next.190
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/contracts/index.sol +37 -5
- package/lib/apy/auraAPY.d.ts +1 -0
- package/lib/apy/auraAPY.js +23 -0
- package/lib/apy/auraAbi.d.ts +17 -0
- package/lib/apy/auraAbi.js +26 -0
- package/lib/apy/convexAPY.d.ts +10 -7
- package/lib/apy/convexAPY.js +32 -24
- package/lib/apy/curveAPY.d.ts +54 -5
- package/lib/apy/curveAPY.js +128 -72
- package/lib/apy/defiLamaAPY.d.ts +3 -0
- package/lib/apy/defiLamaAPY.js +69 -0
- package/lib/apy/index.d.ts +13 -4
- package/lib/apy/index.js +59 -5
- package/lib/apy/lidoAPY.d.ts +4 -1
- package/lib/apy/lidoAPY.js +7 -10
- package/lib/apy/yearnAPY.d.ts +3 -3
- package/lib/apy/yearnAPY.js +15 -12
- package/lib/contracts/contractsRegister.d.ts +13 -6
- package/lib/contracts/contractsRegister.js +47 -2
- package/lib/core/assets.js +2 -2
- package/lib/core/bot.d.ts +11 -0
- package/lib/core/bot.js +23 -0
- package/lib/core/creditAccount.d.ts +67 -22
- package/lib/core/creditAccount.js +234 -107
- package/lib/core/creditAccount.spec.js +850 -93
- package/lib/core/creditManager.d.ts +19 -5
- package/lib/core/creditManager.js +111 -49
- package/lib/core/creditSession.d.ts +24 -3
- package/lib/core/creditSession.js +32 -7
- package/lib/core/endpoint.d.ts +11 -0
- package/lib/core/endpoint.js +37 -0
- package/lib/core/eventOrTx.d.ts +2 -3
- package/lib/core/events.js +7 -7
- package/lib/core/gauge.d.ts +26 -0
- package/lib/core/gauge.js +63 -0
- package/lib/core/gaugeMath.d.ts +40 -0
- package/lib/core/gaugeMath.js +105 -0
- package/lib/core/gaugeMath.spec.js +388 -0
- package/lib/core/{pool/data.d.ts → pool.d.ts} +21 -13
- package/lib/core/{pool/data.js → pool.js} +82 -61
- package/lib/core/rewardClaimer.d.ts +6 -4
- package/lib/core/rewardConvex.d.ts +27 -11
- package/lib/core/rewardConvex.js +197 -56
- package/lib/core/rewardConvex.spec.js +32 -69
- package/lib/core/strategy.d.ts +18 -21
- package/lib/core/strategy.js +14 -34
- package/lib/core/trade.d.ts +11 -12
- package/lib/core/trade.js +36 -28
- package/lib/core/transactions.d.ts +131 -18
- package/lib/core/transactions.js +240 -119
- package/lib/gearboxRewards/abi.d.ts +2 -0
- package/lib/gearboxRewards/abi.js +54 -0
- package/lib/gearboxRewards/api.d.ts +80 -0
- package/lib/gearboxRewards/api.js +261 -0
- package/lib/gearboxRewards/apy.d.ts +37 -0
- package/lib/gearboxRewards/apy.js +65 -0
- package/lib/gearboxRewards/extraAPY.d.ts +32 -0
- package/lib/gearboxRewards/extraAPY.js +132 -0
- package/lib/gearboxRewards/index.d.ts +4 -0
- package/lib/gearboxRewards/index.js +20 -0
- package/lib/index.d.ts +11 -5
- package/lib/index.js +12 -6
- package/lib/parsers/ERC20Parser.js +1 -1
- package/lib/parsers/aaveV2LendingPoolAdapterParser.d.ts +7 -0
- package/lib/parsers/aaveV2LendingPoolAdapterParser.js +21 -0
- package/lib/parsers/aaveV2WrappedATokenAdapterParser.d.ts +7 -0
- package/lib/parsers/aaveV2WrappedATokenAdapterParser.js +21 -0
- package/lib/parsers/abstractParser.d.ts +11 -9
- package/lib/parsers/abstractParser.js +14 -2
- package/lib/parsers/addressProviderParser.js +1 -1
- package/lib/parsers/balancerV2VaultParser.d.ts +7 -0
- package/lib/parsers/balancerV2VaultParser.js +34 -0
- package/lib/parsers/compoundV2CTokenAdapterParser.d.ts +7 -0
- package/lib/parsers/compoundV2CTokenAdapterParser.js +21 -0
- package/lib/parsers/convexBaseRewardPoolAdapterParser.js +13 -9
- package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.js +9 -6
- package/lib/parsers/convexBoosterAdapterParser.js +7 -7
- package/lib/parsers/convexBoosterAdapterParser.spec.js +4 -4
- package/lib/parsers/convextRewardPoolParser.js +1 -1
- package/lib/parsers/creditFacadeParser.js +34 -7
- package/lib/parsers/creditFacadeParser.spec.js +2 -3
- package/lib/parsers/creditManagerParser.js +1 -1
- package/lib/parsers/curveAdapterParser.js +11 -11
- package/lib/parsers/curveAdapterParser.spec.js +6 -2
- package/lib/parsers/erc626AdapterParser.d.ts +7 -0
- package/lib/parsers/erc626AdapterParser.js +21 -0
- package/lib/parsers/iParser.d.ts +1 -1
- package/lib/parsers/lidoAdapterParser.js +4 -3
- package/lib/parsers/lidoAdapterParser.spec.js +2 -2
- package/lib/parsers/lidoSTETHParser.js +1 -1
- package/lib/parsers/poolParser.js +1 -1
- package/lib/parsers/priceOracleParser.js +1 -1
- package/lib/parsers/txParser.d.ts +17 -11
- package/lib/parsers/txParser.js +41 -4
- package/lib/parsers/uniV2AdapterParser.js +5 -4
- package/lib/parsers/uniV2AdapterParser.spec.js +3 -2
- package/lib/parsers/uniV3AdapterParser.js +9 -7
- package/lib/parsers/uniV3AdapterParser.spec.js +3 -2
- package/lib/parsers/wstETHAdapterParser.js +7 -5
- package/lib/parsers/wstETHAdapterParser.spec.js +4 -4
- package/lib/parsers/yearnAdapterParser.spec.js +4 -4
- package/lib/parsers/yearnV2AdapterParser.js +14 -4
- package/lib/pathfinder/balancerVault.d.ts +33 -0
- package/lib/pathfinder/balancerVault.js +59 -0
- package/lib/pathfinder/core.d.ts +7 -9
- package/lib/pathfinder/index.d.ts +4 -0
- package/lib/pathfinder/index.js +20 -0
- package/lib/pathfinder/pathOptions.d.ts +3 -3
- package/lib/pathfinder/pathOptions.js +34 -18
- package/lib/pathfinder/pathOptions.spec.js +3 -6
- package/lib/pathfinder/pathfinder.d.ts +47 -19
- package/lib/pathfinder/pathfinder.js +71 -60
- package/lib/pathfinder/pathfinder.spec.js +23 -10
- package/lib/pathfinder/utils.d.ts +35 -0
- package/lib/pathfinder/utils.js +181 -0
- package/lib/pathfinder/v1/core.d.ts +16 -0
- package/lib/pathfinder/v1/pathfinderv1.d.ts +46 -0
- package/lib/pathfinder/v1/pathfinderv1.js +154 -0
- package/lib/pathfinder/v1/pathfinderv1.spec.js +39 -0
- package/lib/payload/bot.d.ts +13 -0
- package/lib/payload/creditAccount.d.ts +3 -4
- package/lib/payload/creditManager.d.ts +7 -4
- package/lib/payload/creditSession.d.ts +15 -1
- package/lib/payload/gauge.d.ts +11 -0
- package/lib/payload/pool.d.ts +8 -2
- package/lib/payload/token.d.ts +3 -1
- package/lib/redstone/api.d.ts +44 -0
- package/lib/redstone/api.js +344 -0
- package/lib/redstone/index.d.ts +1 -0
- package/lib/{core/pool → redstone}/index.js +1 -1
- package/lib/tokens/tokenData.d.ts +5 -4
- package/lib/tokens/tokenData.js +24 -5
- package/lib/types/AddressProvider.d.ts +151 -332
- package/lib/types/Balances.sol/BalanceOps.d.ts +15 -22
- package/lib/types/CalldataExtractor.d.ts +28 -0
- package/lib/types/Claimable.d.ts +46 -97
- package/lib/types/CompositePriceFeed.d.ts +90 -0
- package/lib/types/ContractsRegisterTrait.d.ts +25 -0
- package/lib/types/ERC20.d.ts +169 -0
- package/lib/types/Errors.d.ts +106 -227
- package/lib/types/FarmAccounting.d.ts +20 -0
- package/lib/types/FarmAccounting.js +2 -0
- package/lib/types/IAaveV2_LendingPoolAdapter.d.ts +127 -0
- package/lib/types/IAaveV2_LendingPoolAdapter.js +2 -0
- package/lib/types/IAaveV2_WrappedATokenAdapter.d.ts +205 -0
- package/lib/types/IAaveV2_WrappedATokenAdapter.js +2 -0
- package/lib/types/IAdapter.d.ts +26 -59
- package/lib/types/IAddressProvider.sol/IAddressProvider.d.ts +53 -108
- package/lib/types/IAddressProvider.sol/IAddressProviderEvents.d.ts +29 -35
- package/lib/types/IAddressProviderV3.sol/IAddressProviderV3.d.ts +79 -85
- package/lib/types/IAddressProviderV3.sol/IAddressProviderV3Events.d.ts +34 -37
- package/lib/types/IAirdropDistributor.sol/IAirdropDistributor.d.ts +101 -109
- package/lib/types/IAirdropDistributor.sol/IAirdropDistributorEvents.d.ts +76 -64
- package/lib/types/IBalancerV2Vault.sol/IBalancerV2Vault.d.ts +287 -0
- package/lib/types/IBalancerV2Vault.sol/IBalancerV2Vault.js +2 -0
- package/lib/types/IBalancerV2Vault.sol/IBalancerV2VaultGetters.d.ts +87 -0
- package/lib/types/IBalancerV2Vault.sol/IBalancerV2VaultGetters.js +2 -0
- package/lib/types/IBalancerV2Vault.sol/index.d.ts +2 -0
- package/lib/types/IBalancerV2Vault.sol/index.js +2 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter.d.ts +415 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter.js +2 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents.d.ts +37 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents.js +2 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions.d.ts +20 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions.js +2 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/index.d.ts +3 -0
- package/lib/types/IBalancerV2VaultAdapter.sol/index.js +2 -0
- package/lib/types/IBaseRewardPool.d.ts +143 -320
- package/lib/types/IBotListV3.sol/IBotListV3.d.ts +300 -0
- package/lib/types/IBotListV3.sol/IBotListV3.js +2 -0
- package/lib/types/IBotListV3.sol/IBotListV3Events.d.ts +127 -0
- package/lib/types/IBotListV3.sol/IBotListV3Events.js +2 -0
- package/lib/types/IBotListV3.sol/index.d.ts +2 -0
- package/lib/types/IBotListV3.sol/index.js +2 -0
- package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter.d.ts +147 -0
- package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter.js +2 -0
- package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions.d.ts +20 -0
- package/lib/types/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions.js +2 -0
- package/lib/types/ICompoundV2_CTokenAdapter.sol/index.d.ts +2 -0
- package/lib/types/ICompoundV2_CTokenAdapter.sol/index.js +2 -0
- package/lib/types/IContractsRegister.sol/IContractsRegister.d.ts +87 -0
- package/lib/types/IContractsRegister.sol/IContractsRegister.js +2 -0
- package/lib/types/IContractsRegister.sol/IContractsRegisterEvents.d.ts +50 -0
- package/lib/types/IContractsRegister.sol/IContractsRegisterEvents.js +2 -0
- package/lib/types/IContractsRegister.sol/index.d.ts +2 -0
- package/lib/types/IContractsRegister.sol/index.js +2 -0
- package/lib/types/IControllerTimelockV3.sol/IControllerTimelockV3.d.ts +416 -0
- package/lib/types/IControllerTimelockV3.sol/IControllerTimelockV3.js +2 -0
- package/lib/types/IControllerTimelockV3.sol/IControllerTimelockV3Events.d.ts +97 -0
- package/lib/types/IControllerTimelockV3.sol/IControllerTimelockV3Events.js +2 -0
- package/lib/types/IControllerTimelockV3.sol/index.d.ts +2 -0
- package/lib/types/IControllerTimelockV3.sol/index.js +2 -0
- package/lib/types/IConvexToken.d.ts +128 -157
- package/lib/types/IConvexV1BaseRewardPoolAdapter.d.ts +183 -250
- package/lib/types/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapter.d.ts +132 -183
- package/lib/types/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapterEvents.d.ts +29 -35
- package/lib/types/ICreditAccountV3.sol/ICreditAccountBase.d.ts +59 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountBase.js +2 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountV3.d.ts +77 -0
- package/lib/types/ICreditAccountV3.sol/ICreditAccountV3.js +2 -0
- package/lib/types/ICreditAccountV3.sol/index.d.ts +2 -0
- package/lib/types/ICreditAccountV3.sol/index.js +2 -0
- package/lib/types/ICreditConfiguratorV2.sol/ICreditConfiguratorV2.d.ts +526 -579
- package/lib/types/ICreditConfiguratorV2.sol/ICreditConfiguratorV2Events.d.ts +342 -264
- package/lib/types/ICreditConfiguratorV2.sol/ICreditConfiguratorV2Exceptions.d.ts +15 -22
- package/lib/types/ICreditConfiguratorV3.sol/ICreditConfiguratorV3.d.ts +549 -648
- package/lib/types/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events.d.ts +327 -248
- package/lib/types/ICreditFacadeV2.sol/ICreditFacadeV2.d.ts +587 -635
- package/lib/types/ICreditFacadeV2.sol/ICreditFacadeV2Events.d.ts +294 -239
- package/lib/types/ICreditFacadeV2.sol/ICreditFacadeV2Exceptions.d.ts +15 -22
- package/lib/types/ICreditFacadeV2.sol/ICreditFacadeV2Extended.d.ts +59 -126
- package/lib/types/ICreditFacadeV2.sol/ICreditFacadeV2V2.d.ts +34 -53
- package/lib/types/ICreditFacadeV3.sol/ICreditFacadeV3.d.ts +421 -512
- package/lib/types/ICreditFacadeV3.sol/ICreditFacadeV3Events.d.ts +202 -152
- package/lib/types/ICreditFacadeV3Multicall.d.ts +170 -245
- package/lib/types/ICreditManagerV2.sol/ICreditManagerV2.d.ts +438 -567
- package/lib/types/ICreditManagerV2.sol/ICreditManagerV2Events.d.ts +43 -46
- package/lib/types/ICreditManagerV2.sol/ICreditManagerV2Exceptions.d.ts +15 -22
- package/lib/types/ICreditManagerV3.sol/ICreditManagerV3.d.ts +652 -841
- package/lib/types/ICreditManagerV3.sol/ICreditManagerV3Events.d.ts +28 -33
- package/lib/types/ICurvePool.d.ts +285 -376
- package/lib/types/ICurvePool_2.sol/ICurvePool2Assets.d.ts +365 -511
- package/lib/types/ICurvePool_3.sol/ICurvePool3Assets.d.ts +370 -607
- package/lib/types/ICurvePool_4.sol/ICurvePool4Assets.d.ts +387 -631
- package/lib/types/ICurveV1Adapter.d.ts +330 -547
- package/lib/types/ICurveV1_2AssetsAdapter.d.ts +387 -628
- package/lib/types/ICurveV1_3AssetsAdapter.d.ts +387 -691
- package/lib/types/ICurveV1_4AssetsAdapter.d.ts +399 -697
- package/lib/types/IDaiLikePermit.d.ts +48 -51
- package/lib/types/IDataCompressorV2_1.d.ts +491 -0
- package/lib/types/IDataCompressorV2_1.js +2 -0
- package/lib/types/IDataCompressorV3.d.ts +581 -0
- package/lib/types/IDataCompressorV3.js +2 -0
- package/lib/types/IDegenDistributor.sol/IDegenDistributor.d.ts +67 -84
- package/lib/types/IDegenDistributor.sol/IDegenDistributorEvents.d.ts +44 -45
- package/lib/types/IDegenNFTV2.sol/IDegenNFTV2.d.ts +297 -0
- package/lib/types/IDegenNFTV2.sol/IDegenNFTV2.js +2 -0
- package/lib/types/IDegenNFTV2.sol/IDegenNFTV2Events.d.ts +64 -0
- package/lib/types/IDegenNFTV2.sol/IDegenNFTV2Events.js +2 -0
- package/lib/types/IDegenNFTV2.sol/IDegenNFTV2Exceptions.d.ts +20 -0
- package/lib/types/IDegenNFTV2.sol/IDegenNFTV2Exceptions.js +2 -0
- package/lib/types/IDegenNFTV2.sol/index.d.ts +3 -0
- package/lib/types/IDegenNFTV2.sol/index.js +2 -0
- package/lib/types/IERC165.d.ts +29 -0
- package/lib/types/IERC165.js +2 -0
- package/lib/types/IERC20.d.ts +114 -127
- package/lib/types/IERC20Metadata.d.ts +120 -145
- package/lib/types/IERC20Permit.d.ts +50 -63
- package/lib/types/IERC20ZapperDeposits.d.ts +112 -0
- package/lib/types/IERC20ZapperDeposits.js +2 -0
- package/lib/types/IERC4626.d.ts +277 -353
- package/lib/types/IERC4626Adapter.d.ts +173 -0
- package/lib/types/IERC4626Adapter.js +2 -0
- package/lib/types/IERC721.d.ts +199 -0
- package/lib/types/IERC721.js +2 -0
- package/lib/types/IERC721Metadata.d.ts +211 -0
- package/lib/types/IERC721Metadata.js +2 -0
- package/lib/types/IETHZapperDeposits.d.ts +39 -0
- package/lib/types/IETHZapperDeposits.js +2 -0
- package/lib/types/IFarmingPool.d.ts +245 -0
- package/lib/types/IFarmingPool.js +2 -0
- package/lib/types/IGasPricer.d.ts +29 -0
- package/lib/types/IGasPricer.js +2 -0
- package/lib/types/IGaugeV3.sol/IGaugeV3.d.ts +309 -0
- package/lib/types/IGaugeV3.sol/IGaugeV3.js +2 -0
- package/lib/types/IGaugeV3.sol/IGaugeV3Events.d.ts +144 -0
- package/lib/types/IGaugeV3.sol/IGaugeV3Events.js +2 -0
- package/lib/types/IGaugeV3.sol/index.d.ts +2 -0
- package/lib/types/IGaugeV3.sol/index.js +2 -0
- package/lib/types/IGearStakingV3.sol/IGearStakingV3.d.ts +354 -0
- package/lib/types/IGearStakingV3.sol/IGearStakingV3.js +2 -0
- package/lib/types/IGearStakingV3.sol/IGearStakingV3Events.d.ts +135 -0
- package/lib/types/IGearStakingV3.sol/IGearStakingV3Events.js +2 -0
- package/lib/types/IGearStakingV3.sol/index.d.ts +2 -0
- package/lib/types/IGearStakingV3.sol/index.js +2 -0
- package/lib/types/IInterestRateModel.d.ts +31 -42
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeed.d.ts +164 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeed.js +2 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedEvents.d.ts +51 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedEvents.js +2 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedExceptions.d.ts +20 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedExceptions.js +2 -0
- package/lib/types/ILPPriceFeed.sol/index.d.ts +3 -0
- package/lib/types/ILPPriceFeed.sol/index.js +2 -0
- package/lib/types/ILidoV1Adapter.d.ts +71 -132
- package/lib/types/ILinearInterestRateModelV3.d.ts +97 -0
- package/lib/types/ILinearInterestRateModelV3.js +2 -0
- package/lib/types/IOffchainOracle.d.ts +44 -51
- package/lib/types/IPartialLiquidationBotV3.d.ts +154 -0
- package/lib/types/IPartialLiquidationBotV3.js +2 -0
- package/lib/types/IPermit2.d.ts +91 -103
- package/lib/types/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3.d.ts +380 -0
- package/lib/types/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3.js +2 -0
- package/lib/types/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3Events.d.ts +133 -0
- package/lib/types/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3Events.js +2 -0
- package/lib/types/IPoolQuotaKeeperV3.sol/index.d.ts +2 -0
- package/lib/types/IPoolQuotaKeeperV3.sol/index.js +2 -0
- package/lib/types/IPoolService.sol/IPoolService.d.ts +292 -338
- package/lib/types/IPoolService.sol/IPoolServiceEvents.d.ts +189 -146
- package/lib/types/IPoolV3.sol/IPoolV3.d.ts +662 -825
- package/lib/types/IPoolV3.sol/IPoolV3Events.d.ts +181 -142
- package/lib/types/IPriceFeed.sol/IPriceFeed.d.ts +69 -0
- package/lib/types/IPriceFeed.sol/IPriceFeed.js +2 -0
- package/lib/types/IPriceFeed.sol/IUpdatablePriceFeed.d.ts +77 -0
- package/lib/types/IPriceFeed.sol/IUpdatablePriceFeed.js +2 -0
- package/lib/types/IPriceFeed.sol/index.d.ts +2 -0
- package/lib/types/IPriceFeed.sol/index.js +2 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2.d.ts +146 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2.js +2 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2Events.d.ts +37 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2Events.js +2 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2Exceptions.d.ts +20 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2Exceptions.js +2 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2Ext.d.ts +160 -0
- package/lib/types/IPriceOracle.sol/IPriceOracleV2Ext.js +2 -0
- package/lib/types/IPriceOracle.sol/index.d.ts +4 -0
- package/lib/types/IPriceOracle.sol/index.js +2 -0
- package/lib/types/IPriceOracleBase.d.ts +65 -76
- package/lib/types/IPriceOracleV3.sol/IPriceOracleV3.d.ts +281 -0
- package/lib/types/IPriceOracleV3.sol/IPriceOracleV3.js +2 -0
- package/lib/types/IPriceOracleV3.sol/IPriceOracleV3Events.d.ts +94 -0
- package/lib/types/IPriceOracleV3.sol/IPriceOracleV3Events.js +2 -0
- package/lib/types/IPriceOracleV3.sol/index.d.ts +2 -0
- package/lib/types/IPriceOracleV3.sol/index.js +2 -0
- package/lib/types/IRouter.d.ts +226 -208
- package/lib/types/IRouterV3.d.ts +333 -0
- package/lib/types/IRouterV3.js +2 -0
- package/lib/types/IUniswapV2Adapter.sol/IUniswapV2Adapter.d.ts +159 -175
- package/lib/types/IUniswapV2Adapter.sol/IUniswapV2AdapterEvents.d.ts +34 -37
- package/lib/types/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions.d.ts +15 -22
- package/lib/types/IUniswapV3.sol/ISwapRouter.d.ts +124 -153
- package/lib/types/IUniswapV3Adapter.sol/IUniswapV3Adapter.d.ts +289 -330
- package/lib/types/IUniswapV3Adapter.sol/IUniswapV3AdapterEvents.d.ts +41 -39
- package/lib/types/IUniswapV3Adapter.sol/IUniswapV3AdapterExceptions.d.ts +15 -22
- package/lib/types/IVersion.d.ts +18 -35
- package/lib/types/IVotingContractV3.d.ts +53 -0
- package/lib/types/IVotingContractV3.js +2 -0
- package/lib/types/IWETH.d.ts +147 -177
- package/lib/types/IWETHGateway.d.ts +59 -82
- package/lib/types/IYVault.d.ts +183 -264
- package/lib/types/IYearnV2Adapter.d.ts +161 -230
- package/lib/types/IZapper.d.ts +81 -115
- package/lib/types/IZapperRegister.d.ts +55 -0
- package/lib/types/IZapperRegister.js +2 -0
- package/lib/types/IstETH.sol/IstETH.d.ts +146 -199
- package/lib/types/IstETH.sol/IstETHGetters.d.ts +143 -184
- package/lib/types/IwstETH.sol/IwstETH.d.ts +154 -207
- package/lib/types/IwstETH.sol/IwstETHGetters.d.ts +140 -177
- package/lib/types/IwstETHGateway.sol/IwstETHGateWay.d.ts +44 -63
- package/lib/types/IwstETHV1Adapter.d.ts +102 -163
- package/lib/types/NumericArrayLib.d.ts +20 -0
- package/lib/types/NumericArrayLib.js +2 -0
- package/lib/types/Ownable.d.ts +42 -77
- package/lib/types/PartialLiquidationBotV3.d.ts +158 -0
- package/lib/types/PartialLiquidationBotV3.js +2 -0
- package/lib/types/RedstoneConstants.d.ts +20 -0
- package/lib/types/RedstoneConstants.js +2 -0
- package/lib/types/RedstoneConsumerBase.d.ts +64 -0
- package/lib/types/RedstoneConsumerBase.js +2 -0
- package/lib/types/RedstoneConsumerNumericBase.d.ts +64 -0
- package/lib/types/RedstoneConsumerNumericBase.js +2 -0
- package/lib/types/RedstoneDefaultsLib.d.ts +20 -0
- package/lib/types/RedstoneDefaultsLib.js +2 -0
- package/lib/types/RedstonePriceFeed.sol/IRedstonePriceFeedEvents.d.ts +36 -0
- package/lib/types/RedstonePriceFeed.sol/IRedstonePriceFeedEvents.js +2 -0
- package/lib/types/RedstonePriceFeed.sol/IRedstonePriceFeedExceptions.d.ts +20 -0
- package/lib/types/RedstonePriceFeed.sol/IRedstonePriceFeedExceptions.js +2 -0
- package/lib/types/RedstonePriceFeed.sol/RedstonePriceFeed.d.ts +174 -0
- package/lib/types/RedstonePriceFeed.sol/RedstonePriceFeed.js +2 -0
- package/lib/types/RedstonePriceFeed.sol/index.d.ts +3 -0
- package/lib/types/RedstonePriceFeed.sol/index.js +2 -0
- package/lib/types/SafeERC20.d.ts +15 -22
- package/lib/types/common.d.ts +40 -12
- package/lib/types/factories/AddressProvider__factory.d.ts +125 -124
- package/lib/types/factories/AddressProvider__factory.js +127 -130
- package/lib/types/factories/Balances.sol/BalanceOps__factory.d.ts +17 -16
- package/lib/types/factories/Balances.sol/BalanceOps__factory.js +11 -14
- package/lib/types/factories/CalldataExtractor__factory.d.ts +88 -0
- package/lib/types/factories/CalldataExtractor__factory.js +124 -0
- package/lib/types/factories/Claimable__factory.d.ts +42 -41
- package/lib/types/factories/Claimable__factory.js +40 -43
- package/lib/types/factories/CompositePriceFeed__factory.d.ts +203 -0
- package/lib/types/factories/CompositePriceFeed__factory.js +274 -0
- package/lib/types/factories/ContractsRegisterTrait__factory.d.ts +21 -0
- package/lib/types/factories/ContractsRegisterTrait__factory.js +37 -0
- package/lib/types/factories/ERC20__factory.d.ts +240 -0
- package/lib/types/factories/ERC20__factory.js +325 -0
- package/lib/types/factories/Errors__factory.d.ts +113 -112
- package/lib/types/factories/Errors__factory.js +107 -110
- package/lib/types/factories/FarmAccounting__factory.d.ts +34 -0
- package/lib/types/factories/FarmAccounting__factory.js +54 -0
- package/lib/types/factories/{IWETHZapper__factory.d.ts → IAaveV2_LendingPoolAdapter__factory.d.ts} +97 -108
- package/lib/types/factories/{IWETHZapper__factory.js → IAaveV2_LendingPoolAdapter__factory.js} +108 -123
- package/lib/types/factories/IAaveV2_WrappedATokenAdapter__factory.d.ts +251 -0
- package/lib/types/factories/IAaveV2_WrappedATokenAdapter__factory.js +341 -0
- package/lib/types/factories/IAdapter__factory.d.ts +17 -18
- package/lib/types/factories/IAdapter__factory.js +18 -18
- package/lib/types/factories/IAddressProvider.sol/IAddressProviderEvents__factory.d.ts +9 -10
- package/lib/types/factories/IAddressProvider.sol/IAddressProviderEvents__factory.js +10 -10
- package/lib/types/factories/IAddressProvider.sol/IAddressProvider__factory.d.ts +50 -51
- package/lib/types/factories/IAddressProvider.sol/IAddressProvider__factory.js +55 -55
- package/lib/types/factories/IAddressProviderV3.sol/IAddressProviderV3Events__factory.d.ts +11 -12
- package/lib/types/factories/IAddressProviderV3.sol/IAddressProviderV3Events__factory.js +12 -12
- package/lib/types/factories/IAddressProviderV3.sol/IAddressProviderV3__factory.d.ts +39 -40
- package/lib/types/factories/IAddressProviderV3.sol/IAddressProviderV3__factory.js +45 -45
- package/lib/types/factories/IAirdropDistributor.sol/IAirdropDistributorEvents__factory.d.ts +27 -28
- package/lib/types/factories/IAirdropDistributor.sol/IAirdropDistributorEvents__factory.js +28 -28
- package/lib/types/factories/IAirdropDistributor.sol/IAirdropDistributor__factory.d.ts +73 -74
- package/lib/types/factories/IAirdropDistributor.sol/IAirdropDistributor__factory.js +88 -88
- package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2VaultGetters__factory.d.ts +77 -0
- package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2VaultGetters__factory.js +111 -0
- package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2Vault__factory.d.ts +359 -0
- package/lib/types/factories/IBalancerV2Vault.sol/IBalancerV2Vault__factory.js +475 -0
- package/lib/types/factories/IBalancerV2Vault.sol/index.d.ts +2 -0
- package/lib/types/factories/IBalancerV2Vault.sol/index.js +10 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents__factory.d.ts +22 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterEvents__factory.js +38 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions__factory.d.ts +11 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapterExceptions__factory.js +24 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter__factory.d.ts +513 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/IBalancerV2VaultAdapter__factory.js +675 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/index.d.ts +3 -0
- package/lib/types/factories/IBalancerV2VaultAdapter.sol/index.js +12 -0
- package/lib/types/factories/IBaseRewardPool__factory.d.ts +116 -117
- package/lib/types/factories/IBaseRewardPool__factory.js +117 -117
- package/lib/types/factories/IBotListV3.sol/IBotListV3Events__factory.d.ts +102 -0
- package/lib/types/factories/IBotListV3.sol/IBotListV3Events__factory.js +138 -0
- package/lib/types/factories/IBotListV3.sol/IBotListV3__factory.d.ts +314 -0
- package/lib/types/factories/IBotListV3.sol/IBotListV3__factory.js +416 -0
- package/lib/types/factories/IBotListV3.sol/index.d.ts +2 -0
- package/lib/types/factories/IBotListV3.sol/index.js +10 -0
- package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter__factory.d.ts +195 -0
- package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_CTokenAdapter__factory.js +267 -0
- package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions__factory.d.ts +15 -0
- package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/ICompoundV2_Exceptions__factory.js +30 -0
- package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/index.d.ts +2 -0
- package/lib/types/factories/ICompoundV2_CTokenAdapter.sol/index.js +10 -0
- package/lib/types/factories/IContractsRegister.sol/IContractsRegisterEvents__factory.d.ts +27 -0
- package/lib/types/factories/IContractsRegister.sol/IContractsRegisterEvents__factory.js +45 -0
- package/lib/types/factories/IContractsRegister.sol/IContractsRegister__factory.d.ts +133 -0
- package/lib/types/factories/IContractsRegister.sol/IContractsRegister__factory.js +186 -0
- package/lib/types/factories/IContractsRegister.sol/index.d.ts +2 -0
- package/lib/types/factories/IContractsRegister.sol/index.js +10 -0
- package/lib/types/factories/IControllerTimelockV3.sol/IControllerTimelockV3Events__factory.d.ts +72 -0
- package/lib/types/factories/IControllerTimelockV3.sol/IControllerTimelockV3Events__factory.js +101 -0
- package/lib/types/factories/IControllerTimelockV3.sol/IControllerTimelockV3__factory.d.ts +426 -0
- package/lib/types/factories/IControllerTimelockV3.sol/IControllerTimelockV3__factory.js +556 -0
- package/lib/types/factories/IControllerTimelockV3.sol/index.d.ts +2 -0
- package/lib/types/factories/IControllerTimelockV3.sol/index.js +10 -0
- package/lib/types/factories/IConvexToken__factory.d.ts +91 -82
- package/lib/types/factories/IConvexToken__factory.js +102 -89
- package/lib/types/factories/IConvexV1BaseRewardPoolAdapter__factory.d.ts +123 -72
- package/lib/types/factories/IConvexV1BaseRewardPoolAdapter__factory.js +140 -72
- package/lib/types/factories/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapterEvents__factory.d.ts +9 -10
- package/lib/types/factories/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapterEvents__factory.js +10 -10
- package/lib/types/factories/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapter__factory.d.ts +68 -61
- package/lib/types/factories/IConvexV1BoosterAdapter.sol/IConvexV1BoosterAdapter__factory.js +75 -65
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.d.ts +63 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountBase__factory.js +92 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.d.ts +87 -0
- package/lib/types/factories/ICreditAccountV3.sol/ICreditAccountV3__factory.js +123 -0
- package/lib/types/factories/ICreditAccountV3.sol/index.d.ts +2 -0
- package/lib/types/factories/ICreditAccountV3.sol/index.js +10 -0
- package/lib/types/factories/ICreditConfiguratorV2.sol/ICreditConfiguratorV2Events__factory.d.ts +123 -124
- package/lib/types/factories/ICreditConfiguratorV2.sol/ICreditConfiguratorV2Events__factory.js +130 -130
- package/lib/types/factories/ICreditConfiguratorV2.sol/ICreditConfiguratorV2Exceptions__factory.d.ts +20 -21
- package/lib/types/factories/ICreditConfiguratorV2.sol/ICreditConfiguratorV2Exceptions__factory.js +21 -21
- package/lib/types/factories/ICreditConfiguratorV2.sol/ICreditConfiguratorV2__factory.d.ts +378 -379
- package/lib/types/factories/ICreditConfiguratorV2.sol/ICreditConfiguratorV2__factory.js +420 -420
- package/lib/types/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory.d.ts +120 -121
- package/lib/types/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3Events__factory.js +130 -130
- package/lib/types/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory.d.ts +397 -398
- package/lib/types/factories/ICreditConfiguratorV3.sol/ICreditConfiguratorV3__factory.js +423 -423
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2Events__factory.d.ts +109 -110
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2Events__factory.js +121 -121
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2Exceptions__factory.d.ts +67 -68
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2Exceptions__factory.js +68 -68
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2Extended__factory.d.ts +25 -30
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2Extended__factory.js +26 -31
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2V2__factory.d.ts +7 -8
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2V2__factory.js +8 -8
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2__factory.d.ts +603 -604
- package/lib/types/factories/ICreditFacadeV2.sol/ICreditFacadeV2__factory.js +752 -752
- package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.d.ts +79 -85
- package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3Events__factory.js +87 -93
- package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.d.ts +282 -350
- package/lib/types/factories/ICreditFacadeV3.sol/ICreditFacadeV3__factory.js +374 -459
- package/lib/types/factories/ICreditFacadeV3Multicall__factory.d.ts +87 -84
- package/lib/types/factories/ICreditFacadeV3Multicall__factory.js +96 -92
- package/lib/types/factories/ICreditManagerV2.sol/ICreditManagerV2Events__factory.d.ts +13 -14
- package/lib/types/factories/ICreditManagerV2.sol/ICreditManagerV2Events__factory.js +15 -15
- package/lib/types/factories/ICreditManagerV2.sol/ICreditManagerV2Exceptions__factory.d.ts +28 -29
- package/lib/types/factories/ICreditManagerV2.sol/ICreditManagerV2Exceptions__factory.js +29 -29
- package/lib/types/factories/ICreditManagerV2.sol/ICreditManagerV2__factory.d.ts +254 -255
- package/lib/types/factories/ICreditManagerV2.sol/ICreditManagerV2__factory.js +275 -275
- package/lib/types/factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory.d.ts +7 -8
- package/lib/types/factories/ICreditManagerV3.sol/ICreditManagerV3Events__factory.js +8 -8
- package/lib/types/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.d.ts +400 -393
- package/lib/types/factories/ICreditManagerV3.sol/ICreditManagerV3__factory.js +439 -429
- package/lib/types/factories/ICurvePool_2.sol/ICurvePool2Assets__factory.d.ts +193 -194
- package/lib/types/factories/ICurvePool_2.sol/ICurvePool2Assets__factory.js +194 -194
- package/lib/types/factories/ICurvePool_3.sol/ICurvePool3Assets__factory.d.ts +193 -194
- package/lib/types/factories/ICurvePool_3.sol/ICurvePool3Assets__factory.js +194 -194
- package/lib/types/factories/ICurvePool_4.sol/ICurvePool4Assets__factory.d.ts +193 -194
- package/lib/types/factories/ICurvePool_4.sol/ICurvePool4Assets__factory.js +194 -194
- package/lib/types/factories/ICurvePool__factory.d.ts +161 -162
- package/lib/types/factories/ICurvePool__factory.js +162 -162
- package/lib/types/factories/ICurveV1Adapter__factory.d.ts +173 -232
- package/lib/types/factories/ICurveV1Adapter__factory.js +174 -251
- package/lib/types/factories/ICurveV1_2AssetsAdapter__factory.d.ts +191 -250
- package/lib/types/factories/ICurveV1_2AssetsAdapter__factory.js +192 -269
- package/lib/types/factories/ICurveV1_3AssetsAdapter__factory.d.ts +191 -250
- package/lib/types/factories/ICurveV1_3AssetsAdapter__factory.js +192 -269
- package/lib/types/factories/ICurveV1_4AssetsAdapter__factory.d.ts +191 -250
- package/lib/types/factories/ICurveV1_4AssetsAdapter__factory.js +192 -269
- package/lib/types/factories/IDaiLikePermit__factory.d.ts +12 -13
- package/lib/types/factories/IDaiLikePermit__factory.js +13 -13
- package/lib/types/factories/{IDataCompressorV2_10__factory.d.ts → IDataCompressorV2_1__factory.d.ts} +349 -400
- package/lib/types/factories/{IDataCompressorV2_10__factory.js → IDataCompressorV2_1__factory.js} +352 -416
- package/lib/types/factories/{IDataCompressorV3_00__factory.d.ts → IDataCompressorV3__factory.d.ts} +655 -474
- package/lib/types/factories/{IDataCompressorV3_00__factory.js → IDataCompressorV3__factory.js} +730 -498
- package/lib/types/factories/IDegenDistributor.sol/IDegenDistributorEvents__factory.d.ts +16 -17
- package/lib/types/factories/IDegenDistributor.sol/IDegenDistributorEvents__factory.js +17 -17
- package/lib/types/factories/IDegenDistributor.sol/IDegenDistributor__factory.d.ts +45 -46
- package/lib/types/factories/IDegenDistributor.sol/IDegenDistributor__factory.js +54 -54
- package/lib/types/factories/IDegenNFTV2.sol/IDegenNFTV2Events__factory.d.ts +37 -0
- package/lib/types/factories/IDegenNFTV2.sol/IDegenNFTV2Events__factory.js +58 -0
- package/lib/types/factories/IDegenNFTV2.sol/IDegenNFTV2Exceptions__factory.d.ts +23 -0
- package/lib/types/factories/IDegenNFTV2.sol/IDegenNFTV2Exceptions__factory.js +39 -0
- package/lib/types/factories/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3__factory.d.ts → IDegenNFTV2.sol/IDegenNFTV2__factory.d.ts} +249 -240
- package/lib/types/factories/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3__factory.js → IDegenNFTV2.sol/IDegenNFTV2__factory.js} +273 -256
- package/lib/types/factories/IDegenNFTV2.sol/index.d.ts +3 -0
- package/lib/types/factories/IDegenNFTV2.sol/index.js +12 -0
- package/lib/types/factories/IERC165__factory.d.ts +21 -0
- package/lib/types/factories/IERC165__factory.js +38 -0
- package/lib/types/factories/IERC20Metadata__factory.d.ts +78 -79
- package/lib/types/factories/IERC20Metadata__factory.js +89 -89
- package/lib/types/factories/IERC20Permit__factory.d.ts +18 -19
- package/lib/types/factories/IERC20Permit__factory.js +19 -19
- package/lib/types/factories/IERC20ZapperDeposits__factory.d.ts +119 -0
- package/lib/types/factories/IERC20ZapperDeposits__factory.js +165 -0
- package/lib/types/factories/IERC20__factory.d.ts +69 -70
- package/lib/types/factories/IERC20__factory.js +80 -80
- package/lib/types/factories/IERC4626Adapter__factory.d.ts +219 -0
- package/lib/types/factories/IERC4626Adapter__factory.js +297 -0
- package/lib/types/factories/IERC4626__factory.d.ts +200 -201
- package/lib/types/factories/IERC4626__factory.js +224 -224
- package/lib/types/factories/IERC721Metadata__factory.d.ts +261 -0
- package/lib/types/factories/IERC721Metadata__factory.js +349 -0
- package/lib/types/factories/IERC721__factory.d.ts +227 -0
- package/lib/types/factories/IERC721__factory.js +304 -0
- package/lib/types/factories/IETHZapperDeposits__factory.d.ts +39 -0
- package/lib/types/factories/IETHZapperDeposits__factory.js +62 -0
- package/lib/types/factories/IFarmingPool__factory.d.ts +298 -0
- package/lib/types/factories/IFarmingPool__factory.js +396 -0
- package/lib/types/factories/IGasPricer__factory.d.ts +21 -0
- package/lib/types/factories/IGasPricer__factory.js +38 -0
- package/lib/types/factories/IGaugeV3.sol/IGaugeV3Events__factory.d.ts +117 -0
- package/lib/types/factories/IGaugeV3.sol/IGaugeV3Events__factory.js +157 -0
- package/lib/types/factories/IGaugeV3.sol/IGaugeV3__factory.d.ts +341 -0
- package/lib/types/factories/IGaugeV3.sol/IGaugeV3__factory.js +448 -0
- package/lib/types/factories/IGaugeV3.sol/index.d.ts +2 -0
- package/lib/types/factories/IGaugeV3.sol/index.js +10 -0
- package/lib/types/factories/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events__factory.d.ts → IGearStakingV3.sol/IGearStakingV3Events__factory.d.ts} +56 -87
- package/lib/types/factories/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events__factory.js → IGearStakingV3.sol/IGearStakingV3Events__factory.js} +61 -97
- package/lib/types/factories/IGearStakingV3.sol/IGearStakingV3__factory.d.ts +503 -0
- package/lib/types/factories/IGearStakingV3.sol/IGearStakingV3__factory.js +660 -0
- package/lib/types/factories/IGearStakingV3.sol/index.d.ts +2 -0
- package/lib/types/factories/IGearStakingV3.sol/index.js +10 -0
- package/lib/types/factories/IInterestRateModel__factory.d.ts +10 -11
- package/lib/types/factories/IInterestRateModel__factory.js +11 -11
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedEvents__factory.d.ts +32 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedEvents__factory.js +51 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedExceptions__factory.d.ts +27 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedExceptions__factory.js +44 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeed__factory.d.ts +260 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeed__factory.js +344 -0
- package/lib/types/factories/ILPPriceFeed.sol/index.d.ts +3 -0
- package/lib/types/factories/ILPPriceFeed.sol/index.js +12 -0
- package/lib/types/factories/ILidoV1Adapter__factory.d.ts +46 -43
- package/lib/types/factories/ILidoV1Adapter__factory.js +49 -43
- package/lib/types/factories/ILinearInterestRateModelV3__factory.d.ts +97 -0
- package/lib/types/factories/ILinearInterestRateModelV3__factory.js +136 -0
- package/lib/types/factories/IOffchainOracle__factory.d.ts +13 -14
- package/lib/types/factories/IOffchainOracle__factory.js +14 -14
- package/lib/types/factories/IPartialLiquidationBotV3__factory.d.ts +216 -0
- package/lib/types/factories/IPartialLiquidationBotV3__factory.js +287 -0
- package/lib/types/factories/IPermit2__factory.d.ts +35 -36
- package/lib/types/factories/IPermit2__factory.js +36 -36
- package/lib/types/factories/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3Events__factory.d.ts +102 -0
- package/lib/types/factories/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3Events__factory.js +140 -0
- package/lib/types/factories/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3__factory.d.ts +440 -0
- package/lib/types/factories/IPoolQuotaKeeperV3.sol/IPoolQuotaKeeperV3__factory.js +580 -0
- package/lib/types/factories/IPoolQuotaKeeperV3.sol/index.d.ts +2 -0
- package/lib/types/factories/IPoolQuotaKeeperV3.sol/index.js +10 -0
- package/lib/types/factories/IPoolService.sol/IPoolServiceEvents__factory.d.ts +68 -69
- package/lib/types/factories/IPoolService.sol/IPoolServiceEvents__factory.js +75 -75
- package/lib/types/factories/IPoolService.sol/IPoolService__factory.d.ts +237 -238
- package/lib/types/factories/IPoolService.sol/IPoolService__factory.js +289 -289
- package/lib/types/factories/IPoolV3.sol/IPoolV3Events__factory.d.ts +67 -68
- package/lib/types/factories/IPoolV3.sol/IPoolV3Events__factory.js +71 -71
- package/lib/types/factories/IPoolV3.sol/IPoolV3__factory.d.ts +576 -577
- package/lib/types/factories/IPoolV3.sol/IPoolV3__factory.js +699 -699
- package/lib/types/factories/IPriceFeed.sol/IPriceFeed__factory.d.ts +83 -0
- package/lib/types/factories/IPriceFeed.sol/IPriceFeed__factory.js +117 -0
- package/lib/types/factories/IPriceFeed.sol/IUpdatablePriceFeed__factory.d.ts +103 -0
- package/lib/types/factories/IPriceFeed.sol/IUpdatablePriceFeed__factory.js +143 -0
- package/lib/types/factories/IPriceFeed.sol/index.d.ts +2 -0
- package/lib/types/factories/IPriceFeed.sol/index.js +10 -0
- package/lib/types/factories/IPriceOracle.sol/IPriceOracleV2Events__factory.d.ts +22 -0
- package/lib/types/factories/IPriceOracle.sol/IPriceOracleV2Events__factory.js +38 -0
- package/lib/types/factories/IPriceOracle.sol/IPriceOracleV2Exceptions__factory.d.ts +19 -0
- package/lib/types/factories/IPriceOracle.sol/IPriceOracleV2Exceptions__factory.js +34 -0
- package/lib/types/factories/IPriceOracle.sol/IPriceOracleV2Ext__factory.d.ts +196 -0
- package/lib/types/factories/IPriceOracle.sol/IPriceOracleV2Ext__factory.js +267 -0
- package/lib/types/factories/{IWERC20Zapper__factory.d.ts → IPriceOracle.sol/IPriceOracleV2__factory.d.ts} +109 -103
- package/lib/types/factories/{IWERC20Zapper__factory.js → IPriceOracle.sol/IPriceOracleV2__factory.js} +122 -113
- package/lib/types/factories/IPriceOracle.sol/index.d.ts +4 -0
- package/lib/types/factories/IPriceOracle.sol/index.js +14 -0
- package/lib/types/factories/IPriceOracleBase__factory.d.ts +29 -30
- package/lib/types/factories/IPriceOracleBase__factory.js +30 -30
- package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.d.ts +77 -0
- package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3Events__factory.js +106 -0
- package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.d.ts +325 -0
- package/lib/types/factories/IPriceOracleV3.sol/IPriceOracleV3__factory.js +433 -0
- package/lib/types/factories/IPriceOracleV3.sol/index.d.ts +2 -0
- package/lib/types/factories/IPriceOracleV3.sol/index.js +10 -0
- package/lib/types/factories/IRouterV3__factory.d.ts +511 -0
- package/lib/types/factories/IRouterV3__factory.js +676 -0
- package/lib/types/factories/IRouter__factory.d.ts +170 -157
- package/lib/types/factories/IRouter__factory.js +189 -170
- package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2AdapterEvents__factory.d.ts +10 -11
- package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2AdapterEvents__factory.js +12 -12
- package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions__factory.d.ts +4 -5
- package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions__factory.js +5 -5
- package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2Adapter__factory.d.ts +82 -79
- package/lib/types/factories/IUniswapV2Adapter.sol/IUniswapV2Adapter__factory.js +90 -85
- package/lib/types/factories/IUniswapV3.sol/ISwapRouter__factory.d.ts +52 -53
- package/lib/types/factories/IUniswapV3.sol/ISwapRouter__factory.js +53 -53
- package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3AdapterEvents__factory.d.ts +12 -13
- package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3AdapterEvents__factory.js +14 -14
- package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3AdapterExceptions__factory.d.ts +4 -5
- package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3AdapterExceptions__factory.js +5 -5
- package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3Adapter__factory.d.ts +144 -137
- package/lib/types/factories/IUniswapV3Adapter.sol/IUniswapV3Adapter__factory.js +154 -144
- package/lib/types/factories/IVersion__factory.d.ts +5 -6
- package/lib/types/factories/IVersion__factory.js +6 -6
- package/lib/types/factories/IVotingContractV3__factory.d.ts +43 -0
- package/lib/types/factories/IVotingContractV3__factory.js +65 -0
- package/lib/types/factories/IWETHGateway__factory.d.ts +16 -17
- package/lib/types/factories/IWETHGateway__factory.js +17 -17
- package/lib/types/factories/IWETH__factory.d.ts +104 -105
- package/lib/types/factories/IWETH__factory.js +123 -123
- package/lib/types/factories/IYVault__factory.d.ts +114 -115
- package/lib/types/factories/IYVault__factory.js +125 -125
- package/lib/types/factories/IYearnV2Adapter__factory.d.ts +78 -71
- package/lib/types/factories/IYearnV2Adapter__factory.js +85 -73
- package/lib/types/factories/IZapperRegister__factory.d.ts +41 -0
- package/lib/types/factories/IZapperRegister__factory.js +64 -0
- package/lib/types/factories/IZapper__factory.d.ts +42 -51
- package/lib/types/factories/IZapper__factory.js +43 -53
- package/lib/types/factories/IstETH.sol/IstETHGetters__factory.d.ts +99 -100
- package/lib/types/factories/IstETH.sol/IstETHGetters__factory.js +110 -110
- package/lib/types/factories/IstETH.sol/IstETH__factory.d.ts +103 -104
- package/lib/types/factories/IstETH.sol/IstETH__factory.js +114 -114
- package/lib/types/factories/IwstETH.sol/IwstETHGetters__factory.d.ts +95 -96
- package/lib/types/factories/IwstETH.sol/IwstETHGetters__factory.js +106 -106
- package/lib/types/factories/IwstETH.sol/IwstETH__factory.d.ts +103 -104
- package/lib/types/factories/IwstETH.sol/IwstETH__factory.js +114 -114
- package/lib/types/factories/IwstETHGateway.sol/IwstETHGateWay__factory.d.ts +16 -17
- package/lib/types/factories/IwstETHGateway.sol/IwstETHGateWay__factory.js +18 -18
- package/lib/types/factories/IwstETHV1Adapter__factory.d.ts +54 -47
- package/lib/types/factories/IwstETHV1Adapter__factory.js +59 -47
- package/lib/types/factories/NumericArrayLib__factory.d.ts +26 -0
- package/lib/types/factories/NumericArrayLib__factory.js +44 -0
- package/lib/types/factories/Ownable__factory.d.ts +25 -26
- package/lib/types/factories/Ownable__factory.js +30 -30
- package/lib/types/factories/PartialLiquidationBotV3__factory.d.ts +285 -0
- package/lib/types/factories/PartialLiquidationBotV3__factory.js +376 -0
- package/lib/types/factories/RedstoneConstants__factory.d.ts +66 -0
- package/lib/types/factories/RedstoneConstants__factory.js +96 -0
- package/lib/types/factories/RedstoneConsumerBase__factory.d.ts +163 -0
- package/lib/types/factories/RedstoneConsumerBase__factory.js +223 -0
- package/lib/types/factories/RedstoneConsumerNumericBase__factory.d.ts +163 -0
- package/lib/types/factories/RedstoneConsumerNumericBase__factory.js +223 -0
- package/lib/types/factories/RedstoneDefaultsLib__factory.d.ts +46 -0
- package/lib/types/factories/RedstoneDefaultsLib__factory.js +71 -0
- package/lib/types/factories/RedstonePriceFeed.sol/IRedstonePriceFeedEvents__factory.d.ts +17 -0
- package/lib/types/factories/RedstonePriceFeed.sol/IRedstonePriceFeedEvents__factory.js +32 -0
- package/lib/types/factories/RedstonePriceFeed.sol/IRedstonePriceFeedExceptions__factory.d.ts +27 -0
- package/lib/types/factories/RedstonePriceFeed.sol/IRedstonePriceFeedExceptions__factory.js +44 -0
- package/lib/types/factories/RedstonePriceFeed.sol/RedstonePriceFeed__factory.d.ts +444 -0
- package/lib/types/factories/RedstonePriceFeed.sol/RedstonePriceFeed__factory.js +586 -0
- package/lib/types/factories/RedstonePriceFeed.sol/index.d.ts +3 -0
- package/lib/types/factories/RedstonePriceFeed.sol/index.js +12 -0
- package/lib/types/factories/SafeERC20__factory.d.ts +28 -27
- package/lib/types/factories/SafeERC20__factory.js +22 -25
- package/lib/types/factories/index.d.ts +44 -5
- package/lib/types/factories/index.js +74 -11
- package/lib/types/index.d.ts +164 -14
- package/lib/types/index.js +135 -14
- package/lib/utils/calls.d.ts +7 -0
- package/lib/utils/{repeater.js → calls.js} +11 -1
- package/lib/utils/formatter.d.ts +1 -1
- package/lib/utils/formatter.js +2 -2
- package/lib/utils/math.d.ts +1 -1
- package/lib/utils/math.js +1 -2
- package/lib/utils/types.d.ts +0 -4
- package/package.json +17 -13
- package/contracts/IRouter.sol +0 -100
- package/lib/core/pool/index.d.ts +0 -1
- package/lib/core/strategy.spec.js +0 -62
- package/lib/types/IDataCompressorV2_10.d.ts +0 -511
- package/lib/types/IDataCompressorV3_00.d.ts +0 -533
- package/lib/types/IWERC20Zapper.d.ts +0 -166
- package/lib/types/IWETHZapper.d.ts +0 -162
- package/lib/types/IWithdrawalManagerV3.sol/IWithdrawalManagerV3.d.ts +0 -370
- package/lib/types/IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events.d.ts +0 -133
- package/lib/types/IWithdrawalManagerV3.sol/index.d.ts +0 -2
- package/lib/types/factories/IWithdrawalManagerV3.sol/index.d.ts +0 -2
- package/lib/types/factories/IWithdrawalManagerV3.sol/index.js +0 -10
- package/lib/utils/repeater.d.ts +0 -1
- package/lib/watchers/creditAccountWatcher.d.ts +0 -36
- package/lib/watchers/creditAccountWatcher.js +0 -238
- package/lib/watchers/creditAccountWatcher.spec.js +0 -208
- package/lib/watchers/creditManagerWatcher.d.ts +0 -8
- package/lib/watchers/creditManagerWatcher.js +0 -37
- package/lib/watchers/creditManagerWatcher.spec.d.ts +0 -1
- package/lib/watchers/creditManagerWatcher.spec.js +0 -107
- /package/lib/core/{strategy.spec.d.ts → gaugeMath.spec.d.ts} +0 -0
- /package/lib/{types/IDataCompressorV2_10.js → pathfinder/v1/core.js} +0 -0
- /package/lib/{watchers/creditAccountWatcher.spec.d.ts → pathfinder/v1/pathfinderv1.spec.d.ts} +0 -0
- /package/lib/{types/IDataCompressorV3_00.js → payload/bot.js} +0 -0
- /package/lib/{types/IWERC20Zapper.js → payload/gauge.js} +0 -0
- /package/lib/types/{IWETHZapper.js → CalldataExtractor.js} +0 -0
- /package/lib/types/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3.js → CompositePriceFeed.js} +0 -0
- /package/lib/types/{IWithdrawalManagerV3.sol/IWithdrawalManagerV3Events.js → ContractsRegisterTrait.js} +0 -0
- /package/lib/types/{IWithdrawalManagerV3.sol/index.js → ERC20.js} +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { MultiCall } from "../pathfinder/core";
|
|
2
2
|
import { ChartsCreditManagerPayload, CreditManagerDataPayload, QuotaInfo } from "../payload/creditManager";
|
|
3
3
|
import { LinearModel } from "../payload/pool";
|
|
4
|
+
import { Asset } from "./assets";
|
|
5
|
+
export type CreditManagerType = "universal" | "trade" | "farm" | "restaking";
|
|
4
6
|
export declare class CreditManagerData {
|
|
5
7
|
readonly address: string;
|
|
8
|
+
readonly type: CreditManagerType;
|
|
6
9
|
readonly underlyingToken: string;
|
|
7
10
|
readonly pool: string;
|
|
8
11
|
readonly creditFacade: string;
|
|
@@ -14,6 +17,7 @@ export declare class CreditManagerData {
|
|
|
14
17
|
readonly forbiddenTokenMask: bigint;
|
|
15
18
|
readonly maxEnabledTokensLength: number;
|
|
16
19
|
readonly name: string;
|
|
20
|
+
readonly tier: number;
|
|
17
21
|
readonly baseBorrowRate: number;
|
|
18
22
|
readonly minDebt: bigint;
|
|
19
23
|
readonly maxDebt: bigint;
|
|
@@ -27,14 +31,18 @@ export declare class CreditManagerData {
|
|
|
27
31
|
readonly liquidationDiscountExpired: number;
|
|
28
32
|
readonly collateralTokens: Array<string>;
|
|
29
33
|
readonly supportedTokens: Record<string, true>;
|
|
34
|
+
readonly usableTokens: Record<string, true>;
|
|
30
35
|
readonly adapters: Record<string, string>;
|
|
36
|
+
readonly contractsByAdapter: Record<string, string>;
|
|
31
37
|
readonly liquidationThresholds: Record<string, bigint>;
|
|
32
38
|
readonly quotas: Record<string, QuotaInfo>;
|
|
33
39
|
readonly interestModel: LinearModel;
|
|
34
40
|
constructor(payload: CreditManagerDataPayload);
|
|
41
|
+
get id(): string;
|
|
35
42
|
isQuoted(token: string): boolean;
|
|
36
|
-
encodeAddCollateralV2(
|
|
43
|
+
encodeAddCollateralV2(tokenAddress: string, amount: bigint): MultiCall;
|
|
37
44
|
encodeAddCollateralV3(tokenAddress: string, amount: bigint): MultiCall;
|
|
45
|
+
encodeAddCollateralWithPermitV3(tokenAddress: string, amount: bigint, deadline: bigint, v: bigint | number, r: string, s: string): MultiCall;
|
|
38
46
|
encodeIncreaseDebtV2(amount: bigint): MultiCall;
|
|
39
47
|
encodeIncreaseDebtV3(amount: bigint): MultiCall;
|
|
40
48
|
encodeDecreaseDebtV2(amount: bigint): MultiCall;
|
|
@@ -43,16 +51,22 @@ export declare class CreditManagerData {
|
|
|
43
51
|
encodeEnableTokenV3(token: string): MultiCall;
|
|
44
52
|
encodeDisableTokenV2(token: string): MultiCall;
|
|
45
53
|
encodeDisableTokenV3(token: string): MultiCall;
|
|
54
|
+
encodeRevertIfReceivedLessThanV2(assets: Array<Asset>): MultiCall;
|
|
46
55
|
encodeUpdateQuotaV3(token: string, quotaChange: bigint, minQuota: bigint): MultiCall;
|
|
56
|
+
encodeWithdrawCollateralV3(token: string, amount: bigint, to: string): MultiCall;
|
|
47
57
|
static withdrawAllAndUnwrap_Convex(address: string, claim: boolean): MultiCall;
|
|
48
|
-
|
|
58
|
+
encodeOnDemandPriceUpdateV3(token: string, reserve: boolean, data: string): MultiCall;
|
|
59
|
+
static getTier(name: string): number;
|
|
60
|
+
static getType(name: string): CreditManagerType;
|
|
49
61
|
}
|
|
50
62
|
export declare class ChartsCreditManagerData {
|
|
51
|
-
readonly id: string;
|
|
52
63
|
readonly address: string;
|
|
53
64
|
readonly underlyingToken: string;
|
|
65
|
+
readonly configurator: string;
|
|
66
|
+
readonly creditFacade: string;
|
|
54
67
|
readonly pool: string;
|
|
55
|
-
readonly
|
|
68
|
+
readonly version: number;
|
|
69
|
+
readonly name: string;
|
|
56
70
|
readonly borrowRate: number;
|
|
57
71
|
readonly borrowRateOld: number;
|
|
58
72
|
readonly borrowRateChange: number;
|
|
@@ -60,7 +74,6 @@ export declare class ChartsCreditManagerData {
|
|
|
60
74
|
readonly maxAmount: bigint;
|
|
61
75
|
readonly maxLeverageFactor: number;
|
|
62
76
|
readonly availableLiquidity: bigint;
|
|
63
|
-
readonly version: number;
|
|
64
77
|
readonly feeInterest: number;
|
|
65
78
|
readonly feeLiquidation: number;
|
|
66
79
|
readonly feeLiquidationExpired: number;
|
|
@@ -72,6 +85,7 @@ export declare class ChartsCreditManagerData {
|
|
|
72
85
|
readonly totalBorrowed: bigint;
|
|
73
86
|
readonly totalBorrowedOld: bigint;
|
|
74
87
|
readonly totalBorrowedChange: number;
|
|
88
|
+
readonly totalDebtLimit: bigint;
|
|
75
89
|
readonly totalRepaid: bigint;
|
|
76
90
|
readonly totalProfit: bigint;
|
|
77
91
|
readonly totalProfitOld: bigint;
|
|
@@ -6,6 +6,7 @@ const txParser_1 = require("../parsers/txParser");
|
|
|
6
6
|
const types_1 = require("../types");
|
|
7
7
|
class CreditManagerData {
|
|
8
8
|
address;
|
|
9
|
+
type;
|
|
9
10
|
underlyingToken;
|
|
10
11
|
pool;
|
|
11
12
|
creditFacade; // V2 only: address of creditFacade
|
|
@@ -17,6 +18,7 @@ class CreditManagerData {
|
|
|
17
18
|
forbiddenTokenMask; // V2 only: mask which forbids some particular tokens
|
|
18
19
|
maxEnabledTokensLength;
|
|
19
20
|
name;
|
|
21
|
+
tier;
|
|
20
22
|
baseBorrowRate;
|
|
21
23
|
minDebt;
|
|
22
24
|
maxDebt;
|
|
@@ -30,63 +32,64 @@ class CreditManagerData {
|
|
|
30
32
|
liquidationDiscountExpired;
|
|
31
33
|
collateralTokens = [];
|
|
32
34
|
supportedTokens = {};
|
|
33
|
-
|
|
35
|
+
usableTokens = {};
|
|
36
|
+
adapters = {};
|
|
37
|
+
contractsByAdapter = {};
|
|
34
38
|
liquidationThresholds;
|
|
35
39
|
quotas;
|
|
36
40
|
interestModel;
|
|
37
41
|
constructor(payload) {
|
|
38
42
|
this.address = payload.addr.toLowerCase();
|
|
39
43
|
this.underlyingToken = payload.underlying.toLowerCase();
|
|
44
|
+
this.type = CreditManagerData.getType(payload.name || "");
|
|
45
|
+
this.name = payload.name;
|
|
40
46
|
this.pool = payload.pool.toLowerCase();
|
|
47
|
+
this.tier = CreditManagerData.getTier(payload.name);
|
|
41
48
|
this.creditFacade = payload.creditFacade.toLowerCase();
|
|
42
49
|
this.creditConfigurator = payload.creditConfigurator.toLowerCase();
|
|
43
50
|
this.degenNFT = payload.degenNFT.toLowerCase();
|
|
44
51
|
this.isDegenMode = payload.isDegenMode;
|
|
45
|
-
this.version = payload.cfVersion
|
|
52
|
+
this.version = Number(payload.cfVersion);
|
|
46
53
|
this.isPaused = payload.isPaused;
|
|
47
|
-
this.forbiddenTokenMask =
|
|
48
|
-
this.maxEnabledTokensLength = payload.maxEnabledTokensLength;
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
((0, sdk_gov_1.toBigInt)(payload.feeInterest) + sdk_gov_1.PERCENTAGE_FACTOR) *
|
|
54
|
+
this.forbiddenTokenMask = payload.forbiddenTokenMask;
|
|
55
|
+
this.maxEnabledTokensLength = Number(payload.maxEnabledTokensLength);
|
|
56
|
+
this.baseBorrowRate = Number((payload.baseBorrowRate *
|
|
57
|
+
(payload.feeInterest + sdk_gov_1.PERCENTAGE_FACTOR) *
|
|
52
58
|
sdk_gov_1.PERCENTAGE_DECIMALS) /
|
|
53
59
|
sdk_gov_1.RAY);
|
|
54
|
-
this.minDebt =
|
|
55
|
-
this.maxDebt =
|
|
56
|
-
this.availableToBorrow =
|
|
57
|
-
this.totalDebt =
|
|
58
|
-
this.totalDebtLimit =
|
|
59
|
-
this.feeInterest = payload.feeInterest;
|
|
60
|
-
this.feeLiquidation = payload.feeLiquidation;
|
|
61
|
-
this.liquidationDiscount = payload.liquidationDiscount;
|
|
62
|
-
this.feeLiquidationExpired = payload.feeLiquidationExpired;
|
|
63
|
-
this.liquidationDiscountExpired = payload.liquidationDiscountExpired;
|
|
64
|
-
payload.
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
this.
|
|
60
|
+
this.minDebt = payload.minDebt;
|
|
61
|
+
this.maxDebt = payload.maxDebt;
|
|
62
|
+
this.availableToBorrow = payload.availableToBorrow;
|
|
63
|
+
this.totalDebt = payload.totalDebt;
|
|
64
|
+
this.totalDebtLimit = payload.totalDebtLimit;
|
|
65
|
+
this.feeInterest = Number(payload.feeInterest);
|
|
66
|
+
this.feeLiquidation = Number(payload.feeLiquidation);
|
|
67
|
+
this.liquidationDiscount = Number(payload.liquidationDiscount);
|
|
68
|
+
this.feeLiquidationExpired = Number(payload.feeLiquidationExpired);
|
|
69
|
+
this.liquidationDiscountExpired = Number(payload.liquidationDiscountExpired);
|
|
70
|
+
payload.adapters.forEach(a => {
|
|
71
|
+
const contractLc = a.targetContract.toLowerCase();
|
|
72
|
+
const adaptertLc = a.adapter.toLowerCase();
|
|
73
|
+
this.adapters[contractLc] = adaptertLc;
|
|
74
|
+
this.contractsByAdapter[adaptertLc] = contractLc;
|
|
68
75
|
});
|
|
69
|
-
this.adapters = Object.fromEntries(payload.adapters.map(a => [
|
|
70
|
-
a.targetContract.toLowerCase(),
|
|
71
|
-
a.adapter.toLowerCase(),
|
|
72
|
-
]));
|
|
73
76
|
this.liquidationThresholds = payload.liquidationThresholds.reduce((acc, threshold, index) => {
|
|
74
77
|
const address = payload.collateralTokens[index];
|
|
75
78
|
if (address)
|
|
76
|
-
acc[address.toLowerCase()] =
|
|
79
|
+
acc[address.toLowerCase()] = threshold;
|
|
77
80
|
return acc;
|
|
78
81
|
}, {});
|
|
79
|
-
this.quotas =
|
|
80
|
-
q.token.toLowerCase()
|
|
81
|
-
{
|
|
82
|
+
this.quotas = payload.quotas.reduce((acc, q) => {
|
|
83
|
+
acc[q.token.toLowerCase()] = {
|
|
82
84
|
token: q.token.toLowerCase(),
|
|
83
|
-
rate: q.rate,
|
|
85
|
+
rate: q.rate * sdk_gov_1.PERCENTAGE_DECIMALS,
|
|
84
86
|
quotaIncreaseFee: q.quotaIncreaseFee,
|
|
85
|
-
totalQuoted:
|
|
86
|
-
limit:
|
|
87
|
+
totalQuoted: q.totalQuoted,
|
|
88
|
+
limit: q.limit,
|
|
87
89
|
isActive: q.isActive,
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
+
};
|
|
91
|
+
return acc;
|
|
92
|
+
}, {});
|
|
90
93
|
this.interestModel = {
|
|
91
94
|
interestModel: payload.lirm.interestModel.toLowerCase(),
|
|
92
95
|
U_1: payload.lirm.U_1,
|
|
@@ -95,9 +98,19 @@ class CreditManagerData {
|
|
|
95
98
|
R_slope1: payload.lirm.R_slope1,
|
|
96
99
|
R_slope2: payload.lirm.R_slope2,
|
|
97
100
|
R_slope3: payload.lirm.R_slope3,
|
|
98
|
-
version: payload?.lirm?.version
|
|
101
|
+
version: Number(payload?.lirm?.version),
|
|
99
102
|
isBorrowingMoreU2Forbidden: payload?.lirm?.isBorrowingMoreU2Forbidden,
|
|
100
103
|
};
|
|
104
|
+
payload.collateralTokens.forEach(t => {
|
|
105
|
+
const tLc = t.toLowerCase();
|
|
106
|
+
const zeroLt = this.liquidationThresholds[tLc] === 0n;
|
|
107
|
+
const quotaNotActive = this.quotas[tLc]?.isActive === false;
|
|
108
|
+
const allowed = !zeroLt && !quotaNotActive;
|
|
109
|
+
if (allowed)
|
|
110
|
+
this.usableTokens[tLc] = true;
|
|
111
|
+
this.collateralTokens.push(tLc);
|
|
112
|
+
this.supportedTokens[tLc] = true;
|
|
113
|
+
});
|
|
101
114
|
txParser_1.TxParser.addCreditManager(this.address, this.version);
|
|
102
115
|
if (this.creditFacade !== "" && this.creditFacade !== sdk_gov_1.ADDRESS_0X0) {
|
|
103
116
|
txParser_1.TxParser.addCreditFacade(this.creditFacade, sdk_gov_1.tokenSymbolByAddress[this.underlyingToken], this.version);
|
|
@@ -107,13 +120,16 @@ class CreditManagerData {
|
|
|
107
120
|
})));
|
|
108
121
|
}
|
|
109
122
|
}
|
|
123
|
+
get id() {
|
|
124
|
+
return this.address;
|
|
125
|
+
}
|
|
110
126
|
isQuoted(token) {
|
|
111
127
|
return !!this.quotas[token];
|
|
112
128
|
}
|
|
113
|
-
encodeAddCollateralV2(
|
|
129
|
+
encodeAddCollateralV2(tokenAddress, amount) {
|
|
114
130
|
return {
|
|
115
131
|
target: this.creditFacade,
|
|
116
|
-
callData: types_1.ICreditFacadeV2Extended__factory.createInterface().encodeFunctionData("addCollateral", [
|
|
132
|
+
callData: types_1.ICreditFacadeV2Extended__factory.createInterface().encodeFunctionData("addCollateral", [tokenAddress, amount]),
|
|
117
133
|
};
|
|
118
134
|
}
|
|
119
135
|
encodeAddCollateralV3(tokenAddress, amount) {
|
|
@@ -122,6 +138,12 @@ class CreditManagerData {
|
|
|
122
138
|
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("addCollateral", [tokenAddress, amount]),
|
|
123
139
|
};
|
|
124
140
|
}
|
|
141
|
+
encodeAddCollateralWithPermitV3(tokenAddress, amount, deadline, v, r, s) {
|
|
142
|
+
return {
|
|
143
|
+
target: this.creditFacade,
|
|
144
|
+
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("addCollateralWithPermit", [tokenAddress, amount, deadline, v, r, s]),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
125
147
|
encodeIncreaseDebtV2(amount) {
|
|
126
148
|
return {
|
|
127
149
|
target: this.creditFacade,
|
|
@@ -170,29 +192,67 @@ class CreditManagerData {
|
|
|
170
192
|
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("disableToken", [token]),
|
|
171
193
|
};
|
|
172
194
|
}
|
|
195
|
+
encodeRevertIfReceivedLessThanV2(assets) {
|
|
196
|
+
return {
|
|
197
|
+
target: this.creditFacade,
|
|
198
|
+
callData: types_1.ICreditFacadeV2Extended__factory.createInterface().encodeFunctionData("revertIfReceivedLessThan", [assets]),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
173
201
|
encodeUpdateQuotaV3(token, quotaChange, minQuota) {
|
|
174
202
|
return {
|
|
175
203
|
target: this.creditFacade,
|
|
176
204
|
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("updateQuota", [token, quotaChange, minQuota]),
|
|
177
205
|
};
|
|
178
206
|
}
|
|
207
|
+
encodeWithdrawCollateralV3(token, amount, to) {
|
|
208
|
+
return {
|
|
209
|
+
target: this.creditFacade,
|
|
210
|
+
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("withdrawCollateral", [token, amount, to]),
|
|
211
|
+
};
|
|
212
|
+
}
|
|
179
213
|
static withdrawAllAndUnwrap_Convex(address, claim) {
|
|
180
214
|
return {
|
|
181
215
|
target: address,
|
|
182
|
-
callData: types_1.IConvexV1BaseRewardPoolAdapter__factory.createInterface().encodeFunctionData("
|
|
216
|
+
callData: types_1.IConvexV1BaseRewardPoolAdapter__factory.createInterface().encodeFunctionData("withdrawDiffAndUnwrap", [1, claim]),
|
|
183
217
|
};
|
|
184
218
|
}
|
|
185
|
-
|
|
186
|
-
return
|
|
219
|
+
encodeOnDemandPriceUpdateV3(token, reserve, data) {
|
|
220
|
+
return {
|
|
221
|
+
target: this.creditFacade,
|
|
222
|
+
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("onDemandPriceUpdate", [token, reserve, data]),
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
static getTier(name) {
|
|
226
|
+
const DEFAULT_TIER = 99;
|
|
227
|
+
const l = name.split(" ") || [];
|
|
228
|
+
const [word, number] = l.slice(-2);
|
|
229
|
+
if (word.toLowerCase() === "tier") {
|
|
230
|
+
const n = Number(number || DEFAULT_TIER);
|
|
231
|
+
return Number.isNaN(n) ? DEFAULT_TIER : n;
|
|
232
|
+
}
|
|
233
|
+
return DEFAULT_TIER;
|
|
234
|
+
}
|
|
235
|
+
static getType(name) {
|
|
236
|
+
const [identity = ""] = name.split(" ") || [];
|
|
237
|
+
const lc = identity.toLowerCase();
|
|
238
|
+
if (lc === "farm")
|
|
239
|
+
return "farm";
|
|
240
|
+
if (lc === "trade")
|
|
241
|
+
return "trade";
|
|
242
|
+
if (lc === "restaking")
|
|
243
|
+
return "restaking";
|
|
244
|
+
return "universal";
|
|
187
245
|
}
|
|
188
246
|
}
|
|
189
247
|
exports.CreditManagerData = CreditManagerData;
|
|
190
248
|
class ChartsCreditManagerData {
|
|
191
|
-
id;
|
|
192
249
|
address;
|
|
193
250
|
underlyingToken;
|
|
251
|
+
configurator;
|
|
252
|
+
creditFacade;
|
|
194
253
|
pool;
|
|
195
|
-
|
|
254
|
+
version;
|
|
255
|
+
name;
|
|
196
256
|
borrowRate;
|
|
197
257
|
borrowRateOld;
|
|
198
258
|
borrowRateChange;
|
|
@@ -200,7 +260,6 @@ class ChartsCreditManagerData {
|
|
|
200
260
|
maxAmount;
|
|
201
261
|
maxLeverageFactor; // for V1 only
|
|
202
262
|
availableLiquidity;
|
|
203
|
-
version;
|
|
204
263
|
feeInterest;
|
|
205
264
|
feeLiquidation;
|
|
206
265
|
feeLiquidationExpired;
|
|
@@ -212,6 +271,7 @@ class ChartsCreditManagerData {
|
|
|
212
271
|
totalBorrowed;
|
|
213
272
|
totalBorrowedOld;
|
|
214
273
|
totalBorrowedChange;
|
|
274
|
+
totalDebtLimit;
|
|
215
275
|
totalRepaid;
|
|
216
276
|
totalProfit;
|
|
217
277
|
totalProfitOld;
|
|
@@ -229,12 +289,13 @@ class ChartsCreditManagerData {
|
|
|
229
289
|
totalLiquidatedAccountsChange;
|
|
230
290
|
liquidationThresholds;
|
|
231
291
|
constructor(payload) {
|
|
232
|
-
this.id = (payload.addr || "").toLowerCase();
|
|
233
292
|
this.address = (payload.addr || "").toLowerCase();
|
|
234
293
|
this.underlyingToken = (payload.underlyingToken || "").toLowerCase();
|
|
294
|
+
this.configurator = (payload.configurator || "").toLowerCase();
|
|
295
|
+
this.creditFacade = (payload.creditFacade || "").toLowerCase();
|
|
235
296
|
this.pool = (payload.poolAddress || "").toLowerCase();
|
|
236
297
|
this.version = payload.version || 2;
|
|
237
|
-
this.
|
|
298
|
+
this.name = payload.name || "";
|
|
238
299
|
this.borrowRate = Number(((0, sdk_gov_1.toBigInt)(payload.borrowRate || 0) *
|
|
239
300
|
((0, sdk_gov_1.toBigInt)(payload.feeInterest || 0) + sdk_gov_1.PERCENTAGE_FACTOR) *
|
|
240
301
|
sdk_gov_1.PERCENTAGE_DECIMALS) /
|
|
@@ -252,14 +313,15 @@ class ChartsCreditManagerData {
|
|
|
252
313
|
this.maxAmount = (0, sdk_gov_1.toBigInt)(payload.maxAmount || 0);
|
|
253
314
|
this.availableLiquidity = (0, sdk_gov_1.toBigInt)(payload.availableLiquidity || 0);
|
|
254
315
|
this.availableLiquidityInUSD = payload.availableLiquidityInUSD || 0;
|
|
255
|
-
this.liquidationThresholds = Object.
|
|
256
|
-
t.toLowerCase()
|
|
257
|
-
|
|
258
|
-
|
|
316
|
+
this.liquidationThresholds = Object.entries(payload.liquidityThresholds || {}).reduce((acc, [t, tr]) => {
|
|
317
|
+
acc[t.toLowerCase()] = BigInt(tr);
|
|
318
|
+
return acc;
|
|
319
|
+
}, {});
|
|
259
320
|
this.totalBorrowed = (0, sdk_gov_1.toBigInt)(payload.totalBorrowed || 0);
|
|
260
321
|
this.totalBorrowedOld = (0, sdk_gov_1.toBigInt)(payload.totalBorrowedBIOld || 0);
|
|
261
322
|
this.totalBorrowedInUSD = payload.totalBorrowedInUSD || 0;
|
|
262
323
|
this.totalBorrowedChange = Number((0, sdk_gov_1.toBigInt)(payload.totalBorrowedBI10kBasis || 0) * sdk_gov_1.PERCENTAGE_DECIMALS);
|
|
324
|
+
this.totalDebtLimit = (0, sdk_gov_1.toBigInt)(payload.totalDebtLimit || 0);
|
|
263
325
|
this.totalLosses = (0, sdk_gov_1.toBigInt)(payload.totalLosses || 0);
|
|
264
326
|
this.totalLossesOld = (0, sdk_gov_1.toBigInt)(payload.totalLossesOld || 0);
|
|
265
327
|
this.totalLossesInUSD = payload.totalLossesInUSD || 0;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import { CreditSessionFilteredPayload, CreditSessionPayload, CreditSessionsAggregatedStatsPayload, UserCreditSessionsAggregatedStatsPayload } from "../payload/creditSession";
|
|
1
|
+
import { CreditSessionFilteredPayload, CreditSessionPayload, CreditSessionsAggregatedStatsPayload, SecondaryStatus, UserCreditSessionsAggregatedStatsPayload } from "../payload/creditSession";
|
|
2
2
|
import { AssetWithView } from "./assets";
|
|
3
|
+
export interface CreditSessionAsset extends AssetWithView {
|
|
4
|
+
ind: number;
|
|
5
|
+
isForbidden: boolean;
|
|
6
|
+
isEnabled: boolean;
|
|
7
|
+
quota: bigint;
|
|
8
|
+
quotaIndexLU: bigint;
|
|
9
|
+
isQuoted: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface CreditSessionReward extends AssetWithView {
|
|
12
|
+
pool: string;
|
|
13
|
+
}
|
|
3
14
|
export type CreditSessionStatus = "active" | "closed" | "repaid" | "liquidated" | "liquidateExpired" | "liquidatePaused";
|
|
4
15
|
export declare const CREDIT_SESSION_STATUS_BY_ID: Record<number, CreditSessionStatus>;
|
|
5
16
|
export declare const CREDIT_SESSION_ID_BY_STATUS: Record<CreditSessionStatus, number>;
|
|
@@ -27,10 +38,16 @@ export declare class CreditSession {
|
|
|
27
38
|
readonly apy: number;
|
|
28
39
|
readonly currentBlock: number;
|
|
29
40
|
readonly currentTimestamp: number;
|
|
41
|
+
readonly baseBorrowAPY7DAverage: number;
|
|
42
|
+
readonly baseBorrowAPY_RAY: bigint;
|
|
43
|
+
readonly baseToken: string;
|
|
44
|
+
readonly pool: string;
|
|
30
45
|
readonly entryPrice: number;
|
|
31
46
|
readonly closePrice: number;
|
|
32
47
|
readonly quoteToken: string;
|
|
33
48
|
readonly tradingToken: string;
|
|
49
|
+
readonly sinceTimestamp: number;
|
|
50
|
+
readonly closedAtTimestamp: number;
|
|
34
51
|
readonly borrowAPY_RAY: bigint;
|
|
35
52
|
readonly borrowAPY7DAverage: number;
|
|
36
53
|
readonly totalValueUSD: number;
|
|
@@ -41,10 +58,11 @@ export declare class CreditSession {
|
|
|
41
58
|
readonly spotDebt: bigint;
|
|
42
59
|
readonly spotTotalValue: bigint;
|
|
43
60
|
readonly spotUserFunds: bigint;
|
|
44
|
-
readonly cvxUnclaimedRewards: Array<
|
|
45
|
-
readonly balances: Array<
|
|
61
|
+
readonly cvxUnclaimedRewards: Array<CreditSessionReward>;
|
|
62
|
+
readonly balances: Array<CreditSessionAsset>;
|
|
46
63
|
readonly forbiddenTokens: Record<string, true>;
|
|
47
64
|
readonly disabledTokens: Record<string, true>;
|
|
65
|
+
readonly teritaryStatus: SecondaryStatus;
|
|
48
66
|
constructor(payload: CreditSessionPayload);
|
|
49
67
|
}
|
|
50
68
|
export declare class CreditSessionFiltered {
|
|
@@ -58,6 +76,8 @@ export declare class CreditSessionFiltered {
|
|
|
58
76
|
readonly sinceDate: string;
|
|
59
77
|
readonly closedAt: number;
|
|
60
78
|
readonly closedAtDate: string;
|
|
79
|
+
readonly sinceTimestamp: number;
|
|
80
|
+
readonly closedAtTimestamp: number;
|
|
61
81
|
readonly healthFactor: number;
|
|
62
82
|
readonly leverage: number;
|
|
63
83
|
readonly debt: bigint;
|
|
@@ -68,6 +88,7 @@ export declare class CreditSessionFiltered {
|
|
|
68
88
|
readonly profitInUnderlying: number;
|
|
69
89
|
readonly tfIndex: number;
|
|
70
90
|
readonly balances: Array<AssetWithView>;
|
|
91
|
+
readonly teritaryStatus: SecondaryStatus;
|
|
71
92
|
constructor(payload: CreditSessionFilteredPayload);
|
|
72
93
|
}
|
|
73
94
|
export type CreditSessionSortFields = "type" | "tvl" | "hf" | "debt" | "pnl" | "leverage" | "tfIndex";
|
|
@@ -39,12 +39,16 @@ class CreditSession {
|
|
|
39
39
|
apy;
|
|
40
40
|
currentBlock;
|
|
41
41
|
currentTimestamp;
|
|
42
|
+
baseBorrowAPY7DAverage;
|
|
43
|
+
baseBorrowAPY_RAY;
|
|
44
|
+
baseToken;
|
|
45
|
+
pool;
|
|
42
46
|
entryPrice;
|
|
43
47
|
closePrice;
|
|
44
48
|
quoteToken;
|
|
45
49
|
tradingToken;
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
sinceTimestamp;
|
|
51
|
+
closedAtTimestamp;
|
|
48
52
|
borrowAPY_RAY;
|
|
49
53
|
borrowAPY7DAverage;
|
|
50
54
|
totalValueUSD;
|
|
@@ -59,8 +63,10 @@ class CreditSession {
|
|
|
59
63
|
balances = [];
|
|
60
64
|
forbiddenTokens = {};
|
|
61
65
|
disabledTokens = {};
|
|
66
|
+
teritaryStatus;
|
|
62
67
|
constructor(payload) {
|
|
63
68
|
this.id = (payload.id || "").toLowerCase();
|
|
69
|
+
this.teritaryStatus = payload.teritaryStatus || { secStatus: [] };
|
|
64
70
|
this.status = exports.CREDIT_SESSION_STATUS_BY_ID[payload.status || 0];
|
|
65
71
|
this.borrower = (payload.borrower || "").toLowerCase();
|
|
66
72
|
this.creditManager = (payload.creditManager || "").toLowerCase();
|
|
@@ -75,10 +81,16 @@ class CreditSession {
|
|
|
75
81
|
this.closedAt = payload.closedAt || 0;
|
|
76
82
|
this.sinceDate = (0, moment_1.default)((payload.sinceTimestamp || 0) * 1000).format("Do MMM YYYY");
|
|
77
83
|
this.closedAtDate = (0, moment_1.default)((payload.closedAtTimestamp || 0) * 1000).format("Do MMM YYYY");
|
|
84
|
+
this.sinceTimestamp = payload.sinceTimestamp || 0;
|
|
85
|
+
this.closedAtTimestamp = payload.closedAtTimestamp || 0;
|
|
78
86
|
this.profitInUSD = payload.profitInUSD || 0;
|
|
79
87
|
this.profitInUnderlying = payload.profitInUnderlying || 0;
|
|
80
88
|
this.collateralInUSD = payload.collateralInUSD || 0;
|
|
81
89
|
this.collateralInUnderlying = payload.collateralInUnderlying || 0;
|
|
90
|
+
this.baseBorrowAPY7DAverage = payload.baseBorrowAPY7DAverage || 0;
|
|
91
|
+
this.baseBorrowAPY_RAY = (0, sdk_gov_1.toBigInt)(payload.baseBorrowAPY_RAY || 0);
|
|
92
|
+
this.baseToken = (payload.tradingToken || "").toLowerCase();
|
|
93
|
+
this.pool = (payload.tradingToken || "").toLowerCase();
|
|
82
94
|
this.entryPrice = payload.entryPrice || 0;
|
|
83
95
|
this.closePrice = payload.closePrice || 0;
|
|
84
96
|
this.tradingToken = (payload.tradingToken || "").toLowerCase();
|
|
@@ -98,11 +110,12 @@ class CreditSession {
|
|
|
98
110
|
this.spotDebt = (0, sdk_gov_1.toBigInt)(payload.spotDebt || 0);
|
|
99
111
|
this.spotTotalValue = (0, sdk_gov_1.toBigInt)(payload.spotTotalValue || 0);
|
|
100
112
|
this.spotUserFunds = (0, sdk_gov_1.toBigInt)(payload.spotUserFunds || 0);
|
|
101
|
-
this.cvxUnclaimedRewards = Object.entries(payload.cvxUnclaimedRewards || {}).map(([
|
|
113
|
+
this.cvxUnclaimedRewards = Object.entries(payload.cvxUnclaimedRewards || {}).map(([t, b]) => {
|
|
102
114
|
return {
|
|
103
|
-
token:
|
|
104
|
-
balance: (0, sdk_gov_1.toBigInt)(
|
|
105
|
-
balanceView:
|
|
115
|
+
token: t.toLowerCase(),
|
|
116
|
+
balance: (0, sdk_gov_1.toBigInt)(b.bi || 0),
|
|
117
|
+
balanceView: b.f.toString(),
|
|
118
|
+
pool: b.pool.toLowerCase(),
|
|
106
119
|
};
|
|
107
120
|
});
|
|
108
121
|
Object.entries(payload.balances || {}).forEach(([t, b]) => {
|
|
@@ -110,13 +123,19 @@ class CreditSession {
|
|
|
110
123
|
if (!b.isEnabled) {
|
|
111
124
|
this.disabledTokens[token] = true;
|
|
112
125
|
}
|
|
113
|
-
if (
|
|
126
|
+
if (b.isForbidden) {
|
|
114
127
|
this.forbiddenTokens[token] = true;
|
|
115
128
|
}
|
|
116
129
|
this.balances.push({
|
|
117
130
|
token: token.toLowerCase(),
|
|
118
131
|
balance: (0, sdk_gov_1.toBigInt)(b.BI || 0),
|
|
119
132
|
balanceView: b.F.toString(),
|
|
133
|
+
ind: b.ind,
|
|
134
|
+
isEnabled: b.isEnabled,
|
|
135
|
+
isForbidden: b.isForbidden,
|
|
136
|
+
quota: (0, sdk_gov_1.toBigInt)(b.quota || 0),
|
|
137
|
+
quotaIndexLU: (0, sdk_gov_1.toBigInt)(b.quotaIndexLU || 0),
|
|
138
|
+
isQuoted: b.isQuoted || false,
|
|
120
139
|
});
|
|
121
140
|
});
|
|
122
141
|
}
|
|
@@ -133,6 +152,8 @@ class CreditSessionFiltered {
|
|
|
133
152
|
sinceDate;
|
|
134
153
|
closedAt;
|
|
135
154
|
closedAtDate;
|
|
155
|
+
sinceTimestamp;
|
|
156
|
+
closedAtTimestamp;
|
|
136
157
|
healthFactor;
|
|
137
158
|
leverage;
|
|
138
159
|
debt;
|
|
@@ -143,17 +164,21 @@ class CreditSessionFiltered {
|
|
|
143
164
|
profitInUnderlying;
|
|
144
165
|
tfIndex;
|
|
145
166
|
balances;
|
|
167
|
+
teritaryStatus;
|
|
146
168
|
constructor(payload) {
|
|
147
169
|
this.id = (payload.id || "").toLowerCase();
|
|
148
170
|
this.borrower = (payload.borrower || "").toLowerCase();
|
|
149
171
|
this.account = (payload.account || "").toLowerCase();
|
|
150
172
|
this.creditManager = (payload.creditManager || "").toLowerCase();
|
|
151
173
|
this.underlyingToken = (payload.underlyingToken || "").toLowerCase();
|
|
174
|
+
this.teritaryStatus = payload.teritaryStatus || { secStatus: [] };
|
|
152
175
|
this.status = exports.CREDIT_SESSION_STATUS_BY_ID[payload.status || 0];
|
|
153
176
|
this.since = payload.since || 0;
|
|
154
177
|
this.closedAt = payload.closedAt || 0;
|
|
155
178
|
this.sinceDate = (0, moment_1.default)((payload.since || 0) * 1000).format("Do MMM YYYY");
|
|
156
179
|
this.closedAtDate = (0, moment_1.default)((payload.closedAt || 0) * 1000).format("Do MMM YYYY");
|
|
180
|
+
this.sinceTimestamp = payload.sinceTimestamp || 0;
|
|
181
|
+
this.closedAtTimestamp = payload.closedAtTimestamp || 0;
|
|
157
182
|
this.healthFactor = Number((0, sdk_gov_1.toBigInt)(payload.healthFactor || 0));
|
|
158
183
|
this.leverage = payload.leverage || 0;
|
|
159
184
|
this.debt = (0, sdk_gov_1.toBigInt)(payload.debt || 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NetworkType } from "@gearbox-protocol/sdk-gov";
|
|
2
|
+
export declare const TESTNET_CHAINS: Record<NetworkType, number>;
|
|
3
|
+
type ChartsPriceSource = "chainlink" | "spot";
|
|
4
|
+
interface Options {
|
|
5
|
+
params?: Record<string, string | number>;
|
|
6
|
+
}
|
|
7
|
+
export declare class ChartsApi {
|
|
8
|
+
static getUrl: (url: string, chainId: number, options?: Options, priceSource?: ChartsPriceSource) => string;
|
|
9
|
+
static getRelativeUrl: (url: string, options?: Options) => string;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartsApi = exports.TESTNET_CHAINS = void 0;
|
|
4
|
+
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
5
|
+
exports.TESTNET_CHAINS = {
|
|
6
|
+
Mainnet: 7878,
|
|
7
|
+
Optimism: 7879,
|
|
8
|
+
Arbitrum: 7880,
|
|
9
|
+
Base: 7881,
|
|
10
|
+
};
|
|
11
|
+
const CHARTS_BACKEND_ADDRESSES = {
|
|
12
|
+
[sdk_gov_1.CHAINS.Mainnet]: "https://charts-server.fly.dev",
|
|
13
|
+
[sdk_gov_1.CHAINS.Arbitrum]: "https://arbitrum.gearbox.foundation",
|
|
14
|
+
[sdk_gov_1.CHAINS.Optimism]: "https://optimism.gearbox.foundation",
|
|
15
|
+
// !& Base
|
|
16
|
+
[sdk_gov_1.CHAINS.Local]: "https://charts-server.fly.dev",
|
|
17
|
+
[exports.TESTNET_CHAINS.Mainnet]: "https://testnet.gearbox.foundation",
|
|
18
|
+
[exports.TESTNET_CHAINS.Arbitrum]: "https://arbtest.gearbox.foundation",
|
|
19
|
+
[exports.TESTNET_CHAINS.Optimism]: "https://opttest.gearbox.foundation",
|
|
20
|
+
// !& Base
|
|
21
|
+
};
|
|
22
|
+
class ChartsApi {
|
|
23
|
+
static getUrl = (url, chainId, options, priceSource) => [
|
|
24
|
+
CHARTS_BACKEND_ADDRESSES[chainId],
|
|
25
|
+
"api",
|
|
26
|
+
...(priceSource ? [priceSource] : []),
|
|
27
|
+
this.getRelativeUrl(url, options),
|
|
28
|
+
].join("/");
|
|
29
|
+
static getRelativeUrl = (url, options) => {
|
|
30
|
+
const { params = {} } = options || {};
|
|
31
|
+
const paramsString = Object.entries(params)
|
|
32
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
33
|
+
.join("&");
|
|
34
|
+
return [url, ...(paramsString ? [paramsString] : [])].join("?");
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
exports.ChartsApi = ChartsApi;
|
package/lib/core/eventOrTx.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TokenData } from "../tokens/tokenData";
|
|
2
|
+
import { PartialKeys } from "../utils/types";
|
|
2
3
|
import type { TxSerialized } from "./transactions";
|
|
3
4
|
export interface Display {
|
|
4
5
|
toString: (tokenData: Record<string, TokenData>) => string;
|
|
@@ -28,12 +29,10 @@ export declare abstract class EVMEvent extends EventOrTx {
|
|
|
28
29
|
logId?: number;
|
|
29
30
|
constructor(opts: EVMEventProps);
|
|
30
31
|
}
|
|
31
|
-
type
|
|
32
|
-
export type EVMTxProps = Omit<EventOrTxProps, OptionalFields> & Partial<Pick<EventOrTxProps, OptionalFields>>;
|
|
32
|
+
export type EVMTxProps = PartialKeys<EventOrTxProps, "block" | "txStatus">;
|
|
33
33
|
export declare abstract class EVMTx extends EventOrTx {
|
|
34
34
|
constructor({ txHash, block, txStatus, timestamp, }: EVMTxProps);
|
|
35
35
|
abstract serialize(): TxSerialized;
|
|
36
36
|
revert(block: number): void;
|
|
37
37
|
success(block: number): void;
|
|
38
38
|
}
|
|
39
|
-
export {};
|