@gearbox-protocol/sdk 11.9.0-next.1 → 11.9.0
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/dist/cjs/dev/create2.js +1 -1
- package/dist/cjs/dev/mint/AbstractMinter.js +4 -2
- package/dist/cjs/dev/mint/DealMinter.js +3 -0
- package/dist/cjs/dev/mint/DirectMinter.js +3 -0
- package/dist/cjs/dev/mint/FallbackMinter.js +1 -1
- package/dist/cjs/dev/mint/TransferMinter.js +3 -0
- package/dist/cjs/permissionless/bindings/address-provider.js +6 -4
- package/dist/cjs/permissionless/bindings/base-contract.js +173 -0
- package/dist/cjs/permissionless/bindings/bytecode-repository.js +25 -23
- package/dist/cjs/permissionless/bindings/compressors/token-compressor.js +4 -4
- package/dist/cjs/permissionless/bindings/compressors/withdrawal-compressor.js +17 -11
- package/dist/cjs/permissionless/bindings/cross-chain-multisig.js +22 -23
- package/dist/cjs/permissionless/bindings/factory/abstract-factory.js +4 -7
- package/dist/cjs/permissionless/bindings/governance/batches-chain.js +4 -4
- package/dist/cjs/permissionless/bindings/governance/governor.js +49 -30
- package/dist/cjs/permissionless/bindings/governance/timelock.js +4 -4
- package/dist/cjs/permissionless/bindings/index.js +2 -0
- package/dist/cjs/permissionless/bindings/instance-manager.js +77 -58
- package/dist/cjs/permissionless/bindings/market-configurator-factory.js +4 -4
- package/dist/cjs/permissionless/bindings/market-configurator.js +143 -71
- package/dist/cjs/permissionless/bindings/price-feed-store.js +17 -8
- package/dist/cjs/permissionless/bindings/router/routing-manager.js +15 -9
- package/dist/cjs/permissionless/bindings/treasury-splitter.js +23 -14
- package/dist/cjs/permissionless/core/raw-tx.js +2 -2
- package/dist/cjs/permissionless/utils/abi-decoder.js +72 -0
- package/dist/cjs/permissionless/utils/format.js +2 -2
- package/dist/cjs/permissionless/utils/governance/timelock-txs.js +2 -2
- package/dist/cjs/permissionless/utils/index.js +2 -0
- package/dist/cjs/permissionless/utils/price-update/get-price-feeds.js +2 -1
- package/dist/cjs/permissionless/utils/price-update/get-price-update-tx.js +2 -1
- package/dist/cjs/permissionless/utils/price-update/get-prices.js +2 -1
- package/dist/cjs/permissionless/utils/price-update/get-updatable-feeds.js +3 -2
- package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +2 -1
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/AccountMigratorAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/CamelotV3AdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterDeposit.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/DaiUsdsAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/ERC4626AdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/FluidDexAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/InfraredVaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/LidoV1AdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowClaimerAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowDVVAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowVaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MellowWrapperAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/PendleRouterAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/StakingRewardsAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/UniswapV2AdapterContract.js +5 -5
- package/dist/cjs/plugins/adapters/contracts/UniswapV3AdapterContract.js +22 -22
- package/dist/cjs/plugins/adapters/contracts/UniswapV4AdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/VelodromeV2AdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/WstETHV1AdapterContract.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/YearnV2AdapterContract.js +2 -2
- package/dist/cjs/plugins/bots/BotsPlugin.js +8 -21
- package/dist/cjs/plugins/bots/PartialLiquidationBotBaseContract.js +22 -17
- package/dist/cjs/plugins/bots/PartialLiquidationBotV300Contract.js +20 -4
- package/dist/cjs/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +78 -3
- package/dist/cjs/plugins/zappers/ZappersPlugin.js +1 -1
- package/dist/cjs/sdk/GearboxSDK.js +110 -8
- package/dist/cjs/sdk/accountMigration/AbstractMigrateCreditAccountsService.js +4 -1
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +12 -8
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +10 -8
- package/dist/cjs/sdk/base/AddressLabeller.js +49 -0
- package/dist/cjs/sdk/base/BaseContract.js +80 -195
- package/dist/cjs/sdk/base/IAddressLabeller.js +16 -0
- package/dist/cjs/sdk/base/SDKConstruct.js +29 -3
- package/dist/cjs/sdk/base/TokensMeta.js +4 -4
- package/dist/cjs/sdk/base/index.js +2 -4
- package/dist/cjs/sdk/core/BotListV3Contract.js +2 -2
- package/dist/cjs/sdk/core/GearStakingV3Contract.js +2 -2
- package/dist/cjs/sdk/core/address-provider/AbstractAddressProviderContract.js +2 -2
- package/dist/cjs/sdk/core/address-provider/AddressProviderV300Contract.js +6 -11
- package/dist/cjs/sdk/core/address-provider/AddressProviderV310Contract.js +4 -4
- package/dist/cjs/sdk/market/MarketConfiguratorContract.js +5 -5
- package/dist/cjs/sdk/market/MarketRegister.js +9 -7
- package/dist/cjs/sdk/market/MarketSuite.js +2 -2
- package/dist/cjs/sdk/market/credit/CreditConfiguratorV300Contract.js +3 -4
- package/dist/cjs/sdk/market/credit/CreditConfiguratorV310Contract.js +3 -4
- package/dist/cjs/sdk/market/credit/CreditFacadeV300Contract.js +9 -9
- package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +8 -8
- package/dist/cjs/sdk/market/credit/CreditManagerV300Contract.js +2 -5
- package/dist/cjs/sdk/market/credit/CreditManagerV310Contract.js +2 -5
- package/dist/cjs/sdk/market/credit/CreditSuite.js +3 -2
- package/dist/cjs/sdk/market/loss-policy/AliasLossPolicyV310Contract.js +1 -3
- package/dist/cjs/sdk/market/loss-policy/LossPolicyContract.js +2 -2
- package/dist/cjs/sdk/market/loss-policy/createLossPolicy.js +1 -1
- package/dist/cjs/sdk/market/oracle/PriceOracleBaseContract.js +26 -8
- package/dist/cjs/sdk/market/oracle/createPriceOracle.js +1 -1
- package/dist/cjs/sdk/market/pool/GaugeContract.js +2 -2
- package/dist/cjs/sdk/market/pool/LinearInterestRateModelContract.js +2 -2
- package/dist/cjs/sdk/market/pool/PoolQuotaKeeperV300Contract.js +2 -2
- package/dist/cjs/sdk/market/pool/PoolQuotaKeeperV310Contract.js +2 -2
- package/dist/cjs/sdk/market/pool/PoolSuite.js +1 -1
- package/dist/cjs/sdk/market/pool/PoolV300Contract.js +5 -5
- package/dist/cjs/sdk/market/pool/PoolV310Contract.js +5 -5
- package/dist/cjs/sdk/market/pool/TumblerContract.js +2 -2
- package/dist/cjs/sdk/market/pool/createInterestRateModel.js +15 -11
- package/dist/cjs/sdk/market/pricefeeds/AbstractLPPriceFeed.js +22 -2
- package/dist/cjs/sdk/market/pricefeeds/AbstractPriceFeed.js +3 -3
- package/dist/cjs/sdk/market/pricefeeds/BalancerStablePriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/BalancerWeightedPriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/BoundedPriceFeed.js +2 -6
- package/dist/cjs/sdk/market/pricefeeds/CompositePriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/ConstantPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/CurveCryptoPriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/CurveStablePriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/CurveUSDPriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/Erc4626PriceFeed.js +18 -2
- package/dist/cjs/sdk/market/pricefeeds/ExternalPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/MellowLRTPriceFeed.js +10 -2
- package/dist/cjs/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedRef.js +4 -6
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +2 -0
- package/dist/cjs/sdk/market/pricefeeds/PythPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/RedstonePriceFeed.js +3 -3
- package/dist/cjs/sdk/market/pricefeeds/WstETHPriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/YearnPriceFeed.js +9 -2
- package/dist/cjs/sdk/market/pricefeeds/ZeroPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/updates/PythUpdater.js +8 -6
- package/dist/cjs/sdk/market/pricefeeds/updates/RedstoneUpdater.js +11 -9
- package/dist/cjs/sdk/router/AbstractRouterContract.js +114 -12
- package/dist/cjs/sdk/router/RouterV300Contract.js +9 -10
- package/dist/cjs/sdk/router/RouterV310Contract.js +10 -10
- package/dist/cjs/sdk/router/createRouter.js +0 -4
- package/dist/cjs/sdk/utils/index.js +0 -2
- package/dist/esm/dev/create2.js +2 -2
- package/dist/esm/dev/mint/AbstractMinter.js +7 -3
- package/dist/esm/dev/mint/DealMinter.js +3 -0
- package/dist/esm/dev/mint/DirectMinter.js +3 -0
- package/dist/esm/dev/mint/FallbackMinter.js +1 -1
- package/dist/esm/dev/mint/TransferMinter.js +3 -0
- package/dist/esm/permissionless/bindings/address-provider.js +7 -7
- package/dist/esm/permissionless/bindings/base-contract.js +151 -0
- package/dist/esm/permissionless/bindings/bytecode-repository.js +24 -22
- package/dist/esm/permissionless/bindings/compressors/token-compressor.js +3 -3
- package/dist/esm/permissionless/bindings/compressors/withdrawal-compressor.js +16 -10
- package/dist/esm/permissionless/bindings/cross-chain-multisig.js +16 -20
- package/dist/esm/permissionless/bindings/factory/abstract-factory.js +4 -9
- package/dist/esm/permissionless/bindings/governance/batches-chain.js +3 -3
- package/dist/esm/permissionless/bindings/governance/governor.js +47 -28
- package/dist/esm/permissionless/bindings/governance/timelock.js +3 -3
- package/dist/esm/permissionless/bindings/index.js +1 -0
- package/dist/esm/permissionless/bindings/instance-manager.js +69 -53
- package/dist/esm/permissionless/bindings/market-configurator-factory.js +3 -3
- package/dist/esm/permissionless/bindings/market-configurator.js +137 -65
- package/dist/esm/permissionless/bindings/price-feed-store.js +14 -8
- package/dist/esm/permissionless/bindings/router/routing-manager.js +14 -8
- package/dist/esm/permissionless/bindings/treasury-splitter.js +22 -15
- package/dist/esm/permissionless/core/raw-tx.js +1 -1
- package/dist/esm/permissionless/utils/abi-decoder.js +50 -0
- package/dist/esm/permissionless/utils/format.js +1 -1
- package/dist/esm/permissionless/utils/governance/timelock-txs.js +1 -1
- package/dist/esm/permissionless/utils/index.js +1 -0
- package/dist/esm/permissionless/utils/price-update/get-price-feeds.js +2 -4
- package/dist/esm/permissionless/utils/price-update/get-price-update-tx.js +1 -1
- package/dist/esm/permissionless/utils/price-update/get-prices.js +2 -1
- package/dist/esm/permissionless/utils/price-update/get-updatable-feeds.js +1 -1
- package/dist/esm/plugins/adapters/abi/conctructorAbi.js +2 -1
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +2 -2
- package/dist/esm/plugins/adapters/contracts/AccountMigratorAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/CamelotV3AdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterDeposit.js +2 -2
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/DaiUsdsAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/FluidDexAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/InfraredVaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/LidoV1AdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowClaimerAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowDVVAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowVaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MellowWrapperAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/PendleRouterAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/StakingRewardsAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/UniswapV2AdapterContract.js +5 -5
- package/dist/esm/plugins/adapters/contracts/UniswapV3AdapterContract.js +22 -22
- package/dist/esm/plugins/adapters/contracts/UniswapV4AdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/VelodromeV2AdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/WstETHV1AdapterContract.js +2 -2
- package/dist/esm/plugins/adapters/contracts/YearnV2AdapterContract.js +2 -2
- package/dist/esm/plugins/bots/BotsPlugin.js +8 -11
- package/dist/esm/plugins/bots/PartialLiquidationBotBaseContract.js +22 -7
- package/dist/esm/plugins/bots/PartialLiquidationBotV300Contract.js +20 -4
- package/dist/esm/plugins/delayed-withdrawal/DelayedWithdrawalPlugin.js +78 -3
- package/dist/esm/plugins/zappers/ZappersPlugin.js +1 -1
- package/dist/esm/sdk/GearboxSDK.js +112 -10
- package/dist/esm/sdk/accountMigration/AbstractMigrateCreditAccountsService.js +4 -1
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +13 -9
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +10 -8
- package/dist/esm/sdk/base/AddressLabeller.js +25 -0
- package/dist/esm/sdk/base/BaseContract.js +81 -202
- package/dist/esm/sdk/base/IAddressLabeller.js +0 -0
- package/dist/esm/sdk/base/SDKConstruct.js +29 -3
- package/dist/esm/sdk/base/TokensMeta.js +4 -4
- package/dist/esm/sdk/base/index.js +1 -2
- package/dist/esm/sdk/core/BotListV3Contract.js +2 -2
- package/dist/esm/sdk/core/GearStakingV3Contract.js +2 -2
- package/dist/esm/sdk/core/address-provider/AbstractAddressProviderContract.js +2 -2
- package/dist/esm/sdk/core/address-provider/AddressProviderV300Contract.js +6 -11
- package/dist/esm/sdk/core/address-provider/AddressProviderV310Contract.js +4 -4
- package/dist/esm/sdk/market/MarketConfiguratorContract.js +5 -5
- package/dist/esm/sdk/market/MarketRegister.js +10 -8
- package/dist/esm/sdk/market/MarketSuite.js +2 -2
- package/dist/esm/sdk/market/credit/CreditConfiguratorV300Contract.js +3 -4
- package/dist/esm/sdk/market/credit/CreditConfiguratorV310Contract.js +3 -4
- package/dist/esm/sdk/market/credit/CreditFacadeV300Contract.js +9 -9
- package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +8 -8
- package/dist/esm/sdk/market/credit/CreditManagerV300Contract.js +2 -5
- package/dist/esm/sdk/market/credit/CreditManagerV310Contract.js +2 -5
- package/dist/esm/sdk/market/credit/CreditSuite.js +3 -2
- package/dist/esm/sdk/market/loss-policy/AliasLossPolicyV310Contract.js +1 -3
- package/dist/esm/sdk/market/loss-policy/LossPolicyContract.js +3 -5
- package/dist/esm/sdk/market/loss-policy/createLossPolicy.js +1 -1
- package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +26 -8
- package/dist/esm/sdk/market/oracle/createPriceOracle.js +1 -1
- package/dist/esm/sdk/market/pool/GaugeContract.js +2 -2
- package/dist/esm/sdk/market/pool/LinearInterestRateModelContract.js +2 -2
- package/dist/esm/sdk/market/pool/PoolQuotaKeeperV300Contract.js +2 -2
- package/dist/esm/sdk/market/pool/PoolQuotaKeeperV310Contract.js +2 -2
- package/dist/esm/sdk/market/pool/PoolSuite.js +1 -1
- package/dist/esm/sdk/market/pool/PoolV300Contract.js +5 -5
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +5 -5
- package/dist/esm/sdk/market/pool/TumblerContract.js +2 -2
- package/dist/esm/sdk/market/pool/createInterestRateModel.js +15 -11
- package/dist/esm/sdk/market/pricefeeds/AbstractLPPriceFeed.js +22 -2
- package/dist/esm/sdk/market/pricefeeds/AbstractPriceFeed.js +3 -3
- package/dist/esm/sdk/market/pricefeeds/BalancerStablePriceFeed.js +13 -3
- package/dist/esm/sdk/market/pricefeeds/BalancerWeightedPriceFeed.js +13 -3
- package/dist/esm/sdk/market/pricefeeds/BoundedPriceFeed.js +2 -6
- package/dist/esm/sdk/market/pricefeeds/CompositePriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/ConstantPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/CurveCryptoPriceFeed.js +10 -3
- package/dist/esm/sdk/market/pricefeeds/CurveStablePriceFeed.js +10 -3
- package/dist/esm/sdk/market/pricefeeds/CurveUSDPriceFeed.js +10 -3
- package/dist/esm/sdk/market/pricefeeds/Erc4626PriceFeed.js +18 -2
- package/dist/esm/sdk/market/pricefeeds/ExternalPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/MellowLRTPriceFeed.js +11 -3
- package/dist/esm/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/PriceFeedRef.js +5 -7
- package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +8 -1
- package/dist/esm/sdk/market/pricefeeds/PythPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/RedstonePriceFeed.js +3 -3
- package/dist/esm/sdk/market/pricefeeds/WstETHPriceFeed.js +10 -3
- package/dist/esm/sdk/market/pricefeeds/YearnPriceFeed.js +10 -3
- package/dist/esm/sdk/market/pricefeeds/ZeroPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/updates/PythUpdater.js +9 -7
- package/dist/esm/sdk/market/pricefeeds/updates/RedstoneUpdater.js +12 -10
- package/dist/esm/sdk/router/AbstractRouterContract.js +115 -13
- package/dist/esm/sdk/router/RouterV300Contract.js +9 -10
- package/dist/esm/sdk/router/RouterV310Contract.js +10 -10
- package/dist/esm/sdk/router/createRouter.js +0 -4
- package/dist/esm/sdk/utils/index.js +0 -1
- package/dist/types/dev/create2.d.ts +2 -2
- package/dist/types/dev/mint/AbstractMinter.d.ts +4 -3
- package/dist/types/dev/mint/DealMinter.d.ts +3 -0
- package/dist/types/dev/mint/DirectMinter.d.ts +3 -0
- package/dist/types/dev/mint/TransferMinter.d.ts +3 -0
- package/dist/types/permissionless/bindings/address-provider.d.ts +255 -4
- package/dist/types/permissionless/bindings/base-contract.d.ts +23 -0
- package/dist/types/permissionless/bindings/bytecode-repository.d.ts +6 -5
- package/dist/types/permissionless/bindings/compressors/token-compressor.d.ts +3 -3
- package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +5 -4
- package/dist/types/permissionless/bindings/cross-chain-multisig.d.ts +7 -7
- package/dist/types/permissionless/bindings/factory/abstract-factory.d.ts +1 -1
- package/dist/types/permissionless/bindings/governance/batches-chain.d.ts +4 -3
- package/dist/types/permissionless/bindings/governance/governor.d.ts +7 -6
- package/dist/types/permissionless/bindings/governance/timelock.d.ts +3 -3
- package/dist/types/permissionless/bindings/governance/types.d.ts +1 -1
- package/dist/types/permissionless/bindings/index.d.ts +1 -0
- package/dist/types/permissionless/bindings/instance-manager.d.ts +7 -6
- package/dist/types/permissionless/bindings/market-configurator-factory.d.ts +4 -4
- package/dist/types/permissionless/bindings/market-configurator.d.ts +6 -6
- package/dist/types/permissionless/bindings/price-feed-store.d.ts +7 -6
- package/dist/types/permissionless/bindings/router/routing-manager.d.ts +5 -4
- package/dist/types/permissionless/bindings/treasury-splitter.d.ts +6 -5
- package/dist/types/permissionless/core/proposal.d.ts +7 -1
- package/dist/types/permissionless/utils/abi-decoder.d.ts +13 -0
- package/dist/types/permissionless/utils/create2.d.ts +1 -1
- package/dist/types/permissionless/utils/governance/batch.d.ts +1 -1
- package/dist/types/permissionless/utils/index.d.ts +1 -0
- package/dist/types/permissionless/utils/price-update/get-price-feeds.d.ts +3 -3
- package/dist/types/permissionless/utils/price-update/get-price-update-tx.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/AccountMigratorAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/BalancerV2VaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/CamelotV3AdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/EqualizerRouterAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/FluidDexAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/InfraredVaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowClaimerAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowDepositQueueAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowVaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MellowWrapperAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/StakingRewardsAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +3 -3
- package/dist/types/plugins/adapters/contracts/UniswapV3AdapterContract.d.ts +3 -3
- package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/UpshiftVaultAdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/VelodromeV2AdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/YearnV2AdapterContract.d.ts +2 -2
- package/dist/types/plugins/bots/PartialLiquidationBotV300Contract.d.ts +8 -2
- package/dist/types/plugins/delayed-withdrawal/types.d.ts +1 -0
- package/dist/types/sdk/GearboxSDK.d.ts +76 -5
- package/dist/types/sdk/accountMigration/types.d.ts +2 -1
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +2 -2
- package/dist/types/sdk/accounts/types.d.ts +23 -7
- package/dist/types/sdk/base/AddressLabeller.d.ts +11 -0
- package/dist/types/sdk/base/BaseContract.d.ts +28 -72
- package/dist/types/sdk/base/IAddressLabeller.d.ts +9 -0
- package/dist/types/sdk/base/PlaceholderContract.d.ts +2 -2
- package/dist/types/sdk/base/SDKConstruct.d.ts +16 -2
- package/dist/types/sdk/base/TokensMeta.d.ts +3 -2
- package/dist/types/sdk/base/index.d.ts +1 -2
- package/dist/types/sdk/base/types.d.ts +0 -50
- package/dist/types/sdk/core/BotListV3Contract.d.ts +1 -1
- package/dist/types/sdk/core/GearStakingV3Contract.d.ts +1 -1
- package/dist/types/sdk/core/address-provider/AbstractAddressProviderContract.d.ts +4 -3
- package/dist/types/sdk/core/address-provider/AddressProviderV300Contract.d.ts +3 -3
- package/dist/types/sdk/core/address-provider/AddressProviderV310Contract.d.ts +3 -3
- package/dist/types/sdk/market/MarketConfiguratorContract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditConfiguratorV300Contract.d.ts +3 -3
- package/dist/types/sdk/market/credit/CreditConfiguratorV310Contract.d.ts +3 -3
- package/dist/types/sdk/market/credit/CreditFacadeV300Contract.d.ts +4 -3
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +4 -3
- package/dist/types/sdk/market/credit/CreditManagerV300Contract.d.ts +1 -1
- package/dist/types/sdk/market/credit/CreditManagerV310Contract.d.ts +1 -1
- package/dist/types/sdk/market/credit/CreditSuite.d.ts +1 -1
- package/dist/types/sdk/market/credit/types.d.ts +2 -1
- package/dist/types/sdk/market/loss-policy/AliasLossPolicyV310Contract.d.ts +0 -1
- package/dist/types/sdk/market/loss-policy/LossPolicyContract.d.ts +3 -2
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +12 -3
- package/dist/types/sdk/market/oracle/types.d.ts +10 -0
- package/dist/types/sdk/market/pool/GaugeContract.d.ts +3 -2
- package/dist/types/sdk/market/pool/LinearInterestRateModelContract.d.ts +3 -2
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV300Contract.d.ts +3 -2
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +3 -2
- package/dist/types/sdk/market/pool/PoolV300Contract.d.ts +5 -4
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +5 -4
- package/dist/types/sdk/market/pool/TumblerContract.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/AbstractLPPriceFeed.d.ts +8 -3
- package/dist/types/sdk/market/pricefeeds/AbstractPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/BalancerStablePriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/BalancerWeightedPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/BoundedPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/CompositePriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/ConstantPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/CurveCryptoPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/CurveStablePriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/CurveUSDPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/Erc4626PriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/ExternalPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/MellowLRTPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/PriceFeedRef.d.ts +4 -3
- package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +2 -1
- package/dist/types/sdk/market/pricefeeds/PythPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/RedstonePriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/WstETHPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/YearnPriceFeed.d.ts +3 -2
- package/dist/types/sdk/market/pricefeeds/ZeroPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/types.d.ts +5 -0
- package/dist/types/sdk/router/AbstractRouterContract.d.ts +15 -8
- package/dist/types/sdk/router/RouterV300Contract.d.ts +3 -4
- package/dist/types/sdk/router/RouterV310Contract.d.ts +2 -3
- package/dist/types/sdk/router/types.d.ts +14 -5
- package/dist/types/sdk/sdk-legacy/core/creditAccount.d.ts +2 -2
- package/dist/types/sdk/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/plugins/bots/deserializePartialLiquidationBotParams.js +0 -49
- package/dist/cjs/sdk/base/ChainContractsRegister.js +0 -135
- package/dist/cjs/sdk/base/Construct.js +0 -87
- package/dist/cjs/sdk/utils/abi-decode.js +0 -58
- package/dist/esm/plugins/bots/deserializePartialLiquidationBotParams.js +0 -29
- package/dist/esm/sdk/base/ChainContractsRegister.js +0 -111
- package/dist/esm/sdk/base/Construct.js +0 -63
- package/dist/esm/sdk/utils/abi-decode.js +0 -37
- package/dist/types/plugins/bots/deserializePartialLiquidationBotParams.d.ts +0 -3
- package/dist/types/sdk/base/ChainContractsRegister.d.ts +0 -57
- package/dist/types/sdk/base/Construct.d.ts +0 -38
- package/dist/types/sdk/utils/abi-decode.d.ts +0 -10
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Hex, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditFacadeState, CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { CreditFacadeStateHuman, MultiCall, RawTx } from "../../types/index.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
6
7
|
readonly type: "function";
|
|
@@ -776,13 +777,13 @@ export interface CreditFacadeV300Contract extends Omit<CreditFacadeState, "baseP
|
|
|
776
777
|
}
|
|
777
778
|
export declare class CreditFacadeV300Contract extends BaseContract<abi> {
|
|
778
779
|
readonly underlying: Address;
|
|
779
|
-
constructor(
|
|
780
|
+
constructor(sdk: GearboxSDK, { creditFacade, creditManager }: CreditSuiteState);
|
|
780
781
|
stateHuman(raw?: boolean): CreditFacadeStateHuman;
|
|
781
782
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
782
783
|
liquidateCreditAccount(ca: Address, to: Address, calls: MultiCall[], lossPolicyData?: Hex): RawTx;
|
|
783
784
|
closeCreditAccount(ca: Address, calls: MultiCall[]): RawTx;
|
|
784
785
|
multicall(ca: Address, calls: MultiCall[]): RawTx;
|
|
785
786
|
openCreditAccount(to: Address, calls: MultiCall[], referralCode: bigint): RawTx;
|
|
786
|
-
protected
|
|
787
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[] | undefined;
|
|
787
788
|
}
|
|
788
789
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Hex, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditFacadeState, CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { CreditFacadeStateHuman, MultiCall, RawTx } from "../../types/index.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
6
7
|
readonly type: "function";
|
|
@@ -849,13 +850,13 @@ export interface CreditFacadeV310Contract extends Omit<CreditFacadeState, "baseP
|
|
|
849
850
|
}
|
|
850
851
|
export declare class CreditFacadeV310Contract extends BaseContract<abi> {
|
|
851
852
|
readonly underlying: Address;
|
|
852
|
-
constructor(
|
|
853
|
+
constructor(sdk: GearboxSDK, { creditFacade, creditManager }: CreditSuiteState);
|
|
853
854
|
stateHuman(raw?: boolean): CreditFacadeStateHuman;
|
|
854
855
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
855
856
|
liquidateCreditAccount(ca: Address, to: Address, calls: MultiCall[], lossPolicyData?: Hex): RawTx;
|
|
856
857
|
closeCreditAccount(ca: Address, calls: MultiCall[]): RawTx;
|
|
857
858
|
multicall(ca: Address, calls: MultiCall[]): RawTx;
|
|
858
859
|
openCreditAccount(to: Address, calls: MultiCall[], referralCode: bigint): RawTx;
|
|
859
|
-
protected
|
|
860
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[] | undefined;
|
|
860
861
|
}
|
|
861
862
|
export {};
|
|
@@ -1024,7 +1024,7 @@ declare const abi: readonly [{
|
|
|
1024
1024
|
}];
|
|
1025
1025
|
readonly anonymous: false;
|
|
1026
1026
|
}];
|
|
1027
|
-
export interface CreditManagerV300Contract extends Omit<CreditManagerState, "baseParams" | "collateralTokens" | "liquidationThresholds"
|
|
1027
|
+
export interface CreditManagerV300Contract extends Omit<CreditManagerState, "baseParams" | "collateralTokens" | "liquidationThresholds">, BaseContract<abi> {
|
|
1028
1028
|
}
|
|
1029
1029
|
export declare class CreditManagerV300Contract extends BaseContract<abi> implements ICreditManagerContract {
|
|
1030
1030
|
/**
|
|
@@ -981,7 +981,7 @@ declare const abi: readonly [{
|
|
|
981
981
|
readonly name: "SetCreditConfigurator";
|
|
982
982
|
}];
|
|
983
983
|
type abi = typeof iCreditManagerV310Abi;
|
|
984
|
-
export interface CreditManagerV310Contract extends Omit<CreditManagerState, "baseParams" | "collateralTokens" | "liquidationThresholds"
|
|
984
|
+
export interface CreditManagerV310Contract extends Omit<CreditManagerState, "baseParams" | "collateralTokens" | "liquidationThresholds">, BaseContract<abi> {
|
|
985
985
|
}
|
|
986
986
|
export declare class CreditManagerV310Contract extends BaseContract<abi> implements ICreditManagerContract {
|
|
987
987
|
/**
|
|
@@ -6,6 +6,7 @@ import type { IRouterContract } from "../../router/index.js";
|
|
|
6
6
|
import type { CreditSuiteStateHuman } from "../../types/index.js";
|
|
7
7
|
import type { CreditFacadeContract, ICreditConfiguratorContract, ICreditManagerContract } from "./types.js";
|
|
8
8
|
export declare class CreditSuite extends SDKConstruct {
|
|
9
|
+
readonly name: string;
|
|
9
10
|
readonly pool: Address;
|
|
10
11
|
readonly underlying: Address;
|
|
11
12
|
readonly creditManager: ICreditManagerContract;
|
|
@@ -13,7 +14,6 @@ export declare class CreditSuite extends SDKConstruct {
|
|
|
13
14
|
readonly creditConfigurator: ICreditConfiguratorContract;
|
|
14
15
|
readonly marketConfigurator: Address;
|
|
15
16
|
readonly state: CreditSuiteState;
|
|
16
|
-
readonly name: string;
|
|
17
17
|
constructor(sdk: GearboxSDK, marketData: MarketData, index: number);
|
|
18
18
|
get router(): IRouterContract;
|
|
19
19
|
get dirty(): boolean;
|
|
@@ -6,11 +6,12 @@ import type { IAdapterContract } from "../adapters/index.js";
|
|
|
6
6
|
import type { CreditFacadeV300Contract, CreditFacadeV310Contract } from "../index.js";
|
|
7
7
|
import type { RampEvent } from "./CreditConfiguratorV300Contract.js";
|
|
8
8
|
export interface ICreditConfiguratorContract extends IBaseContract {
|
|
9
|
+
adapters: Address[];
|
|
9
10
|
isPaused: boolean;
|
|
10
11
|
checkRamps: () => Promise<RampEvent[]>;
|
|
11
12
|
stateHuman: (raw?: boolean) => CreditConfiguratorStateHuman;
|
|
12
13
|
}
|
|
13
|
-
export interface ICreditManagerContract extends IBaseContract, Omit<CreditManagerState, "baseParams" | "collateralTokens"
|
|
14
|
+
export interface ICreditManagerContract extends IBaseContract, Omit<CreditManagerState, "baseParams" | "collateralTokens"> {
|
|
14
15
|
/**
|
|
15
16
|
* Mapping targetContract => adapter
|
|
16
17
|
*/
|
|
@@ -285,7 +285,6 @@ export declare class AliasLossPolicyV310Contract extends BaseContract<abi> imple
|
|
|
285
285
|
readonly checksEnabled: boolean;
|
|
286
286
|
readonly tokens: readonly Address[];
|
|
287
287
|
readonly priceFeedParams: readonly AliasedPriceFeedParams[];
|
|
288
|
-
readonly sdk: GearboxSDK;
|
|
289
288
|
constructor(sdk: GearboxSDK, params: BaseParams);
|
|
290
289
|
getLiquidationData(creditAccount: Address, blockNumber?: bigint): Promise<Hex | undefined>;
|
|
291
290
|
stateHuman(raw?: boolean): AliasLossPolicyStateHuman;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Address, Hex } from "viem";
|
|
2
|
-
import { BaseContract, type BaseParams
|
|
2
|
+
import { BaseContract, type BaseParams } from "../../base/index.js";
|
|
3
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
4
|
import type { ILossPolicyContract } from "./types.js";
|
|
4
5
|
declare const abi: readonly [{
|
|
5
6
|
readonly type: "function";
|
|
@@ -129,7 +130,7 @@ declare const abi: readonly [{
|
|
|
129
130
|
}];
|
|
130
131
|
type abi = typeof abi;
|
|
131
132
|
export declare class LossPolicyContract extends BaseContract<abi> implements ILossPolicyContract {
|
|
132
|
-
constructor(
|
|
133
|
+
constructor(sdk: GearboxSDK, params: BaseParams);
|
|
133
134
|
getLiquidationData(_creditAccount: Address, _blockNumber?: bigint): Promise<Hex | undefined>;
|
|
134
135
|
}
|
|
135
136
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Abi, Address } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BaseContractOptions } from "../../base/BaseContract.js";
|
|
3
3
|
import type { PriceOracleData } from "../../base/index.js";
|
|
4
4
|
import { BaseContract } from "../../base/index.js";
|
|
5
5
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
@@ -11,7 +11,6 @@ import PriceFeedAnswerMap from "./PriceFeedAnswerMap.js";
|
|
|
11
11
|
import type { DelegatedOracleMulticall, IPriceOracleContract, OnDemandPriceUpdates, PriceFeedsForTokensOptions } from "./types.js";
|
|
12
12
|
export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly unknown[]> extends BaseContract<abi> implements IPriceOracleContract {
|
|
13
13
|
#private;
|
|
14
|
-
readonly sdk: GearboxSDK;
|
|
15
14
|
/**
|
|
16
15
|
* Mapping Token => [PriceFeed Address, stalenessPeriod]
|
|
17
16
|
*/
|
|
@@ -28,7 +27,7 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
28
27
|
* Mapping Token => Price in USD
|
|
29
28
|
*/
|
|
30
29
|
readonly reservePrices: PriceFeedAnswerMap;
|
|
31
|
-
constructor(sdk: GearboxSDK, args:
|
|
30
|
+
constructor(sdk: GearboxSDK, args: BaseContractOptions<abi>, data: PriceOracleData);
|
|
32
31
|
/**
|
|
33
32
|
* Returns main and reserve price feeds for given tokens
|
|
34
33
|
* @param tokens
|
|
@@ -36,6 +35,11 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
36
35
|
* @returns
|
|
37
36
|
*/
|
|
38
37
|
priceFeedsForTokens(tokens: Address[], opts?: PriceFeedsForTokensOptions): IPriceFeedContract[];
|
|
38
|
+
/**
|
|
39
|
+
* Generates updates for all updateable price feeds in this oracle (including dependencies)
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
updatePriceFeeds(): Promise<UpdatePriceFeedsResult>;
|
|
39
43
|
abstract onDemandPriceUpdates(creditFacade: Address, updates?: UpdatePriceFeedsResult): OnDemandPriceUpdates<PriceUpdateV310 | PriceUpdateV300>;
|
|
40
44
|
/**
|
|
41
45
|
* Gets main price for given token
|
|
@@ -80,6 +84,11 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
80
84
|
* @param reserve use reserve price feed instead of main
|
|
81
85
|
*/
|
|
82
86
|
convertFromUSD(to: Address, amount: bigint, reserve?: boolean): bigint;
|
|
87
|
+
/**
|
|
88
|
+
* Loads new prices for this oracle from PriceFeedCompressor
|
|
89
|
+
* Will (re)create price feeds if needed
|
|
90
|
+
*/
|
|
91
|
+
updatePrices(): Promise<void>;
|
|
83
92
|
/**
|
|
84
93
|
* All price feed tree nodes known to this oracle
|
|
85
94
|
*/
|
|
@@ -54,6 +54,11 @@ export interface IPriceOracleContract extends IBaseContract {
|
|
|
54
54
|
* @returns
|
|
55
55
|
*/
|
|
56
56
|
reservePrice: (token: Address) => bigint;
|
|
57
|
+
/**
|
|
58
|
+
* Loads new prices for this oracle from PriceFeedCompressor
|
|
59
|
+
* Will (re)create price feeds if needed
|
|
60
|
+
*/
|
|
61
|
+
updatePrices: () => Promise<void>;
|
|
57
62
|
/**
|
|
58
63
|
* Paired method to updatePrices, helps to update prices on all oracles in one multicall
|
|
59
64
|
*/
|
|
@@ -82,6 +87,11 @@ export interface IPriceOracleContract extends IBaseContract {
|
|
|
82
87
|
* @returns
|
|
83
88
|
*/
|
|
84
89
|
priceFeedsForTokens: (tokens: Address[], opts?: PriceFeedsForTokensOptions) => IPriceFeedContract[];
|
|
90
|
+
/**
|
|
91
|
+
* Generates updates for all updateable price feeds in this oracle (including dependencies)
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
updatePriceFeeds: () => Promise<UpdatePriceFeedsResult>;
|
|
85
95
|
/**
|
|
86
96
|
* Converts previously obtained price updates into CreditFacade multicall entries
|
|
87
97
|
* @param creditFacade
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { GaugeStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
6
7
|
import type { IRateKeeperContract } from "./types.js";
|
|
@@ -352,7 +353,7 @@ export declare class GaugeContract extends BaseContract<abi> implements IRateKee
|
|
|
352
353
|
readonly epochFrozen: boolean;
|
|
353
354
|
readonly epochLastUpdate: number;
|
|
354
355
|
readonly rates: AddressMap<number>;
|
|
355
|
-
constructor(
|
|
356
|
+
constructor(sdk: GearboxSDK, pool: PoolState, gauge: RateKeeperState);
|
|
356
357
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
357
358
|
stateHuman(raw?: boolean): GaugeStateHuman;
|
|
358
359
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { BaseState
|
|
1
|
+
import type { BaseState } from "../../base/index.js";
|
|
2
2
|
import { BaseContract } from "../../base/index.js";
|
|
3
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
4
|
import type { LinearInterestRateModelStateHuman } from "../../types/index.js";
|
|
4
5
|
import type { IInterestRateModelContract } from "./types.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
@@ -102,7 +103,7 @@ export declare class LinearInterestRateModelContract extends BaseContract<abi> i
|
|
|
102
103
|
readonly Rslope2: number;
|
|
103
104
|
readonly Rslope3: number;
|
|
104
105
|
readonly isBorrowingMoreU2Forbidden: boolean;
|
|
105
|
-
constructor(
|
|
106
|
+
constructor(sdk: GearboxSDK, params: BaseState);
|
|
106
107
|
stateHuman(raw?: boolean): LinearInterestRateModelStateHuman;
|
|
107
108
|
}
|
|
108
109
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -441,7 +442,7 @@ type abi = typeof abi;
|
|
|
441
442
|
export declare class PoolQuotaKeeperV300Contract extends BaseContract<abi> implements IBaseContract {
|
|
442
443
|
readonly decimals: number;
|
|
443
444
|
readonly quotas: AddressMap<QuotaState>;
|
|
444
|
-
constructor(
|
|
445
|
+
constructor(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState);
|
|
445
446
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
446
447
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
447
448
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -471,7 +472,7 @@ type abi = typeof abi;
|
|
|
471
472
|
export declare class PoolQuotaKeeperV310Contract extends BaseContract<abi> implements IBaseContract {
|
|
472
473
|
readonly decimals: number;
|
|
473
474
|
readonly quotas: AddressMap<QuotaState>;
|
|
474
|
-
constructor(
|
|
475
|
+
constructor(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState);
|
|
475
476
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
476
477
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
477
478
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -1095,13 +1096,13 @@ declare const abi: readonly [{
|
|
|
1095
1096
|
readonly anonymous: false;
|
|
1096
1097
|
}];
|
|
1097
1098
|
type abi = typeof abi;
|
|
1098
|
-
export interface PoolV300Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams"
|
|
1099
|
+
export interface PoolV300Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams">, BaseContract<abi> {
|
|
1099
1100
|
}
|
|
1100
1101
|
export declare class PoolV300Contract extends BaseContract<abi> {
|
|
1101
1102
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1102
|
-
constructor(
|
|
1103
|
+
constructor(sdk: GearboxSDK, data: PoolState);
|
|
1103
1104
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1104
1105
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1105
|
-
protected
|
|
1106
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): Array<string> | undefined;
|
|
1106
1107
|
}
|
|
1107
1108
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -1127,13 +1128,13 @@ declare const abi: readonly [{
|
|
|
1127
1128
|
readonly anonymous: false;
|
|
1128
1129
|
}];
|
|
1129
1130
|
type abi = typeof abi;
|
|
1130
|
-
export interface PoolV310Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams"
|
|
1131
|
+
export interface PoolV310Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams">, BaseContract<abi> {
|
|
1131
1132
|
}
|
|
1132
1133
|
export declare class PoolV310Contract extends BaseContract<abi> {
|
|
1133
1134
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1134
|
-
constructor(
|
|
1135
|
+
constructor(sdk: GearboxSDK, data: PoolState);
|
|
1135
1136
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1136
1137
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1137
|
-
protected
|
|
1138
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): Array<string> | undefined;
|
|
1138
1139
|
}
|
|
1139
1140
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { TumblerStateHuman } from "../../types/index.js";
|
|
5
6
|
import { AddressMap } from "../../utils/index.js";
|
|
6
7
|
import type { IRateKeeperContract } from "./types.js";
|
|
@@ -182,7 +183,7 @@ type abi = typeof abi;
|
|
|
182
183
|
export declare class TumblerContract extends BaseContract<abi> implements IRateKeeperContract {
|
|
183
184
|
readonly epochLength: bigint;
|
|
184
185
|
readonly rates: AddressMap<number>;
|
|
185
|
-
constructor(
|
|
186
|
+
constructor(sdk: GearboxSDK, pool: PoolState, tumbler: RateKeeperState);
|
|
186
187
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
187
188
|
stateHuman(raw?: boolean): TumblerStateHuman;
|
|
188
189
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Abi, Address, UnionOmit } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { LPPriceFeedStateHuman } from "../../types/state-human.js";
|
|
4
4
|
import { AbstractPriceFeedContract, type PriceFeedConstructorArgs } from "./AbstractPriceFeed.js";
|
|
5
|
-
|
|
5
|
+
import type { ILPPriceFeedContract } from "./types.js";
|
|
6
|
+
export declare abstract class AbstractLPPriceFeedContract<const abi extends Abi | readonly unknown[]> extends AbstractPriceFeedContract<abi> implements ILPPriceFeedContract {
|
|
6
7
|
readonly lpContract: Address;
|
|
7
8
|
readonly lpToken: Address;
|
|
8
9
|
readonly lowerBound: bigint;
|
|
@@ -10,7 +11,11 @@ export declare abstract class AbstractLPPriceFeedContract<const abi extends Abi
|
|
|
10
11
|
readonly exchangeRate?: bigint;
|
|
11
12
|
readonly aggregatePrice?: bigint;
|
|
12
13
|
readonly scale?: bigint;
|
|
13
|
-
constructor(
|
|
14
|
+
constructor(sdk: GearboxSDK, args: PriceFeedConstructorArgs<abi>);
|
|
15
|
+
abstract getValue(): Promise<bigint>;
|
|
16
|
+
getLowerBound(): Promise<bigint>;
|
|
17
|
+
currentLowerBound(): Promise<bigint>;
|
|
18
|
+
static toLowerBound(value: bigint): bigint;
|
|
14
19
|
stateHuman(raw?: boolean): UnionOmit<LPPriceFeedStateHuman, "stalenessPeriod">;
|
|
15
20
|
}
|
|
16
21
|
export declare function isLPPriceFeed(priceFeed: unknown): priceFeed is AbstractLPPriceFeedContract<any>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Abi, RequiredBy, UnionOmit } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PriceFeedAnswer, PriceFeedTreeNode } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { PriceFeedStateHuman } from "../../types/index.js";
|
|
5
6
|
import { PriceFeedRef } from "./PriceFeedRef.js";
|
|
6
7
|
import type { IPriceFeedContract, IUpdatablePriceFeedContract, PriceFeedContractType } from "./types.js";
|
|
@@ -17,7 +18,7 @@ export declare abstract class AbstractPriceFeedContract<const abi extends Abi |
|
|
|
17
18
|
#private;
|
|
18
19
|
hasLowerBoundCap: boolean;
|
|
19
20
|
readonly description?: string;
|
|
20
|
-
constructor(
|
|
21
|
+
constructor(sdk: GearboxSDK, args: PriceFeedConstructorArgs<abi>);
|
|
21
22
|
get loaded(): boolean;
|
|
22
23
|
get decimals(): number;
|
|
23
24
|
get updatable(): boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { bptStablePriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof bptStablePriceFeedAbi;
|
|
6
6
|
export declare class BalancerStablePriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
|
+
getValue(): Promise<bigint>;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address, Hex, UnionOmit } from "viem";
|
|
2
2
|
import { bptWeightedPriceFeedAbi } from "../../abi/index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
4
|
import type { BalancerWeightedPriceFeedStateHuman } from "../../types/state-human.js";
|
|
5
5
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
6
6
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
@@ -18,7 +18,8 @@ export declare class BalancerWeightedPriceFeedContract extends AbstractLPPriceFe
|
|
|
18
18
|
bigint,
|
|
19
19
|
bigint
|
|
20
20
|
];
|
|
21
|
-
constructor(
|
|
21
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
22
|
+
getValue(): Promise<bigint>;
|
|
22
23
|
stateHuman(raw?: boolean): UnionOmit<BalancerWeightedPriceFeedStateHuman, "stalenessPeriod">;
|
|
23
24
|
}
|
|
24
25
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { boundedPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { BoundedOracleStateHuman } from "../../types/index.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
6
6
|
type abi = typeof boundedPriceFeedAbi;
|
|
7
7
|
export declare class BoundedPriceFeedContract extends AbstractPriceFeedContract<abi> {
|
|
8
8
|
readonly upperBound: bigint;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
10
10
|
stateHuman(raw?: boolean): Omit<BoundedOracleStateHuman, "stalenessPeriod">;
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { compositePriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
4
4
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
5
5
|
import type { PriceFeedRef } from "./PriceFeedRef.js";
|
|
6
6
|
type abi = typeof compositePriceFeedAbi;
|
|
7
7
|
export declare class CompositePriceFeedContract extends AbstractPriceFeedContract<abi> {
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
9
9
|
get targetToBasePriceFeed(): PriceFeedRef;
|
|
10
10
|
get baseToUsdPriceFeed(): PriceFeedRef;
|
|
11
11
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { constantPriceFeedAbi } from "../../abi/oracles.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { ConstantOracleStateHuman } from "../../types/index.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
6
6
|
type abi = typeof constantPriceFeedAbi;
|
|
7
7
|
export declare class ConstantPriceFeedContract extends AbstractPriceFeedContract<abi> {
|
|
8
8
|
readonly price: bigint;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
10
10
|
stateHuman(raw?: boolean): Omit<ConstantOracleStateHuman, "stalenessPeriod">;
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { curveCryptoLpPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof curveCryptoLpPriceFeedAbi;
|
|
6
6
|
export declare class CurveCryptoPriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
|
+
getValue(): Promise<bigint>;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { curveStableLpPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof curveStableLpPriceFeedAbi;
|
|
6
6
|
export declare class CurveStablePriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
|
+
getValue(): Promise<bigint>;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { curveUsdPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof curveUsdPriceFeedAbi;
|
|
6
6
|
export declare class CurveUSDPriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
|
+
getValue(): Promise<bigint>;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { erc4626PriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof erc4626PriceFeedAbi;
|
|
6
6
|
export declare class Erc4626PriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
|
+
getValue(): Promise<bigint>;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { chainlinkReadableAggregatorAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
4
4
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof chainlinkReadableAggregatorAbi;
|
|
6
6
|
export declare class ExternalPriceFeedContract extends AbstractPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { mellowLrtPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof mellowLrtPriceFeedAbi;
|
|
6
6
|
export declare class MellowLRTPriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
8
|
+
getValue(): Promise<bigint>;
|
|
8
9
|
}
|
|
9
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
4
4
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
5
5
|
declare const abi: readonly [{
|
|
@@ -211,6 +211,6 @@ export declare class PendleTWAPPTPriceFeed extends AbstractPriceFeedContract<abi
|
|
|
211
211
|
readonly expiry: bigint;
|
|
212
212
|
readonly twapWindow: number;
|
|
213
213
|
readonly priceToSy: boolean;
|
|
214
|
-
constructor(
|
|
214
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
215
215
|
}
|
|
216
216
|
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import {
|
|
2
|
+
import { SDKConstruct } from "../../base/index.js";
|
|
3
|
+
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
4
|
import type { PriceFeedStateHuman } from "../../types/index.js";
|
|
4
5
|
import type { IPriceFeedContract } from "./types.js";
|
|
5
6
|
/**
|
|
6
7
|
* PriceFeedRef is a connector between price feed and oracle, e.g. oracle's entry for price feed + staleness period
|
|
7
8
|
*/
|
|
8
|
-
export declare class PriceFeedRef extends
|
|
9
|
+
export declare class PriceFeedRef extends SDKConstruct {
|
|
9
10
|
#private;
|
|
10
11
|
readonly address: Address;
|
|
11
12
|
readonly stalenessPeriod: number;
|
|
12
|
-
constructor(
|
|
13
|
+
constructor(sdk: GearboxSDK, address: Address, stalenessPeriod: number);
|
|
13
14
|
get priceFeed(): IPriceFeedContract;
|
|
14
15
|
stateHuman(raw?: boolean): PriceFeedStateHuman;
|
|
15
16
|
}
|
|
@@ -2,7 +2,7 @@ import { type Address, type BlockTag } from "viem";
|
|
|
2
2
|
import type { PriceFeedTreeNode } from "../../base/index.js";
|
|
3
3
|
import { SDKConstruct } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
|
-
import type { RawTx } from "../../types/index.js";
|
|
5
|
+
import type { ILogger, RawTx } from "../../types/index.js";
|
|
6
6
|
import type { IHooks } from "../../utils/internal/index.js";
|
|
7
7
|
import { type PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
8
8
|
import type { IPriceFeedContract, PriceUpdateV310, UpdatePriceFeedsResult } from "./types.js";
|
|
@@ -28,6 +28,7 @@ export interface LatestUpdate {
|
|
|
28
28
|
**/
|
|
29
29
|
export declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeedRegisterHooks> {
|
|
30
30
|
#private;
|
|
31
|
+
readonly logger?: ILogger;
|
|
31
32
|
readonly updaters: IPriceUpdater[];
|
|
32
33
|
constructor(sdk: GearboxSDK, opts?: PriceFeedRegisterOptions);
|
|
33
34
|
addHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: PriceFeedRegisterHooks[K]) => void | Promise<void>) => void;
|