@gearbox-protocol/sdk 11.8.8 → 11.9.0-next.1
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 +2 -4
- package/dist/cjs/dev/mint/DealMinter.js +0 -3
- package/dist/cjs/dev/mint/DirectMinter.js +0 -3
- package/dist/cjs/dev/mint/FallbackMinter.js +1 -1
- package/dist/cjs/dev/mint/TransferMinter.js +0 -3
- package/dist/cjs/permissionless/bindings/address-provider.js +4 -6
- package/dist/cjs/permissionless/bindings/bytecode-repository.js +23 -25
- package/dist/cjs/permissionless/bindings/compressors/token-compressor.js +4 -4
- package/dist/cjs/permissionless/bindings/compressors/withdrawal-compressor.js +11 -17
- package/dist/cjs/permissionless/bindings/cross-chain-multisig.js +23 -22
- package/dist/cjs/permissionless/bindings/factory/abstract-factory.js +7 -4
- package/dist/cjs/permissionless/bindings/governance/batches-chain.js +4 -4
- package/dist/cjs/permissionless/bindings/governance/governor.js +30 -49
- package/dist/cjs/permissionless/bindings/governance/timelock.js +4 -4
- package/dist/cjs/permissionless/bindings/index.js +0 -2
- package/dist/cjs/permissionless/bindings/instance-manager.js +58 -77
- package/dist/cjs/permissionless/bindings/market-configurator-factory.js +4 -4
- package/dist/cjs/permissionless/bindings/market-configurator.js +71 -143
- package/dist/cjs/permissionless/bindings/price-feed-store.js +8 -17
- package/dist/cjs/permissionless/bindings/router/routing-manager.js +9 -15
- package/dist/cjs/permissionless/bindings/treasury-splitter.js +14 -23
- package/dist/cjs/permissionless/core/raw-tx.js +2 -2
- 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 +0 -2
- package/dist/cjs/permissionless/utils/price-update/get-price-feeds.js +1 -2
- package/dist/cjs/permissionless/utils/price-update/get-price-update-tx.js +1 -2
- package/dist/cjs/permissionless/utils/price-update/get-prices.js +1 -2
- package/dist/cjs/permissionless/utils/price-update/get-updatable-feeds.js +2 -3
- 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 +21 -8
- package/dist/cjs/plugins/bots/PartialLiquidationBotBaseContract.js +17 -22
- package/dist/cjs/plugins/bots/PartialLiquidationBotV300Contract.js +4 -20
- package/dist/cjs/plugins/bots/deserializePartialLiquidationBotParams.js +49 -0
- package/dist/cjs/plugins/zappers/ZappersPlugin.js +1 -1
- package/dist/cjs/sdk/GearboxSDK.js +8 -110
- package/dist/cjs/sdk/accountMigration/AbstractMigrateCreditAccountsService.js +1 -4
- package/dist/cjs/sdk/accounts/AbstractCreditAccountsService.js +6 -8
- package/dist/cjs/sdk/base/BaseContract.js +195 -80
- package/dist/cjs/sdk/base/ChainContractsRegister.js +135 -0
- package/dist/cjs/sdk/base/Construct.js +87 -0
- package/dist/cjs/sdk/base/SDKConstruct.js +3 -29
- package/dist/cjs/sdk/base/TokensMeta.js +4 -4
- package/dist/cjs/sdk/base/index.js +4 -2
- 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 +11 -6
- 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 +7 -9
- package/dist/cjs/sdk/market/MarketSuite.js +2 -2
- package/dist/cjs/sdk/market/credit/CreditConfiguratorV300Contract.js +4 -3
- package/dist/cjs/sdk/market/credit/CreditConfiguratorV310Contract.js +4 -3
- 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 +5 -2
- package/dist/cjs/sdk/market/credit/CreditManagerV310Contract.js +5 -2
- package/dist/cjs/sdk/market/credit/CreditSuite.js +2 -3
- package/dist/cjs/sdk/market/loss-policy/AliasLossPolicyV310Contract.js +3 -1
- 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 +8 -26
- 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 +11 -15
- package/dist/cjs/sdk/market/pricefeeds/AbstractLPPriceFeed.js +2 -22
- package/dist/cjs/sdk/market/pricefeeds/AbstractPriceFeed.js +3 -3
- package/dist/cjs/sdk/market/pricefeeds/BalancerStablePriceFeed.js +2 -9
- package/dist/cjs/sdk/market/pricefeeds/BalancerWeightedPriceFeed.js +2 -9
- package/dist/cjs/sdk/market/pricefeeds/BoundedPriceFeed.js +6 -2
- 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 +2 -9
- package/dist/cjs/sdk/market/pricefeeds/CurveStablePriceFeed.js +2 -9
- package/dist/cjs/sdk/market/pricefeeds/CurveUSDPriceFeed.js +2 -9
- package/dist/cjs/sdk/market/pricefeeds/Erc4626PriceFeed.js +2 -18
- package/dist/cjs/sdk/market/pricefeeds/ExternalPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/MellowLRTPriceFeed.js +2 -10
- package/dist/cjs/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedRef.js +6 -4
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +0 -2
- 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 +2 -9
- package/dist/cjs/sdk/market/pricefeeds/YearnPriceFeed.js +2 -9
- package/dist/cjs/sdk/market/pricefeeds/ZeroPriceFeed.js +2 -2
- package/dist/cjs/sdk/market/pricefeeds/updates/PythUpdater.js +6 -8
- package/dist/cjs/sdk/market/pricefeeds/updates/RedstoneUpdater.js +9 -11
- package/dist/cjs/sdk/router/AbstractRouterContract.js +5 -0
- package/dist/cjs/sdk/router/RouterV310Contract.js +3 -3
- package/dist/cjs/sdk/router/createRouter.js +4 -0
- package/dist/cjs/sdk/utils/abi-decode.js +58 -0
- package/dist/cjs/sdk/utils/index.js +2 -0
- package/dist/esm/dev/create2.js +2 -2
- package/dist/esm/dev/mint/AbstractMinter.js +3 -7
- package/dist/esm/dev/mint/DealMinter.js +0 -3
- package/dist/esm/dev/mint/DirectMinter.js +0 -3
- package/dist/esm/dev/mint/FallbackMinter.js +1 -1
- package/dist/esm/dev/mint/TransferMinter.js +0 -3
- package/dist/esm/permissionless/bindings/address-provider.js +7 -7
- package/dist/esm/permissionless/bindings/bytecode-repository.js +22 -24
- package/dist/esm/permissionless/bindings/compressors/token-compressor.js +3 -3
- package/dist/esm/permissionless/bindings/compressors/withdrawal-compressor.js +10 -16
- package/dist/esm/permissionless/bindings/cross-chain-multisig.js +20 -16
- package/dist/esm/permissionless/bindings/factory/abstract-factory.js +9 -4
- package/dist/esm/permissionless/bindings/governance/batches-chain.js +3 -3
- package/dist/esm/permissionless/bindings/governance/governor.js +28 -47
- package/dist/esm/permissionless/bindings/governance/timelock.js +3 -3
- package/dist/esm/permissionless/bindings/index.js +0 -1
- package/dist/esm/permissionless/bindings/instance-manager.js +53 -69
- package/dist/esm/permissionless/bindings/market-configurator-factory.js +3 -3
- package/dist/esm/permissionless/bindings/market-configurator.js +65 -137
- package/dist/esm/permissionless/bindings/price-feed-store.js +8 -14
- package/dist/esm/permissionless/bindings/router/routing-manager.js +8 -14
- package/dist/esm/permissionless/bindings/treasury-splitter.js +15 -22
- package/dist/esm/permissionless/core/raw-tx.js +1 -1
- 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 +0 -1
- package/dist/esm/permissionless/utils/price-update/get-price-feeds.js +4 -2
- package/dist/esm/permissionless/utils/price-update/get-price-update-tx.js +1 -1
- package/dist/esm/permissionless/utils/price-update/get-prices.js +1 -2
- package/dist/esm/permissionless/utils/price-update/get-updatable-feeds.js +1 -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 +11 -8
- package/dist/esm/plugins/bots/PartialLiquidationBotBaseContract.js +7 -22
- package/dist/esm/plugins/bots/PartialLiquidationBotV300Contract.js +4 -20
- package/dist/esm/plugins/bots/deserializePartialLiquidationBotParams.js +29 -0
- package/dist/esm/plugins/zappers/ZappersPlugin.js +1 -1
- package/dist/esm/sdk/GearboxSDK.js +10 -112
- package/dist/esm/sdk/accountMigration/AbstractMigrateCreditAccountsService.js +1 -4
- package/dist/esm/sdk/accounts/AbstractCreditAccountsService.js +7 -9
- package/dist/esm/sdk/base/BaseContract.js +202 -81
- package/dist/esm/sdk/base/ChainContractsRegister.js +111 -0
- package/dist/esm/sdk/base/Construct.js +63 -0
- package/dist/esm/sdk/base/SDKConstruct.js +3 -29
- package/dist/esm/sdk/base/TokensMeta.js +4 -4
- package/dist/esm/sdk/base/index.js +2 -1
- 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 +11 -6
- 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 +8 -10
- package/dist/esm/sdk/market/MarketSuite.js +2 -2
- package/dist/esm/sdk/market/credit/CreditConfiguratorV300Contract.js +4 -3
- package/dist/esm/sdk/market/credit/CreditConfiguratorV310Contract.js +4 -3
- 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 +5 -2
- package/dist/esm/sdk/market/credit/CreditManagerV310Contract.js +5 -2
- package/dist/esm/sdk/market/credit/CreditSuite.js +2 -3
- package/dist/esm/sdk/market/loss-policy/AliasLossPolicyV310Contract.js +3 -1
- package/dist/esm/sdk/market/loss-policy/LossPolicyContract.js +5 -3
- package/dist/esm/sdk/market/loss-policy/createLossPolicy.js +1 -1
- package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +8 -26
- 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 +11 -15
- package/dist/esm/sdk/market/pricefeeds/AbstractLPPriceFeed.js +2 -22
- package/dist/esm/sdk/market/pricefeeds/AbstractPriceFeed.js +3 -3
- package/dist/esm/sdk/market/pricefeeds/BalancerStablePriceFeed.js +3 -13
- package/dist/esm/sdk/market/pricefeeds/BalancerWeightedPriceFeed.js +3 -13
- package/dist/esm/sdk/market/pricefeeds/BoundedPriceFeed.js +6 -2
- 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 +3 -10
- package/dist/esm/sdk/market/pricefeeds/CurveStablePriceFeed.js +3 -10
- package/dist/esm/sdk/market/pricefeeds/CurveUSDPriceFeed.js +3 -10
- package/dist/esm/sdk/market/pricefeeds/Erc4626PriceFeed.js +2 -18
- package/dist/esm/sdk/market/pricefeeds/ExternalPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/MellowLRTPriceFeed.js +3 -11
- package/dist/esm/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/PriceFeedRef.js +7 -5
- package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +1 -8
- 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 +3 -10
- package/dist/esm/sdk/market/pricefeeds/YearnPriceFeed.js +3 -10
- package/dist/esm/sdk/market/pricefeeds/ZeroPriceFeed.js +2 -2
- package/dist/esm/sdk/market/pricefeeds/updates/PythUpdater.js +7 -9
- package/dist/esm/sdk/market/pricefeeds/updates/RedstoneUpdater.js +10 -12
- package/dist/esm/sdk/router/AbstractRouterContract.js +5 -0
- package/dist/esm/sdk/router/RouterV310Contract.js +3 -3
- package/dist/esm/sdk/router/createRouter.js +4 -0
- package/dist/esm/sdk/utils/abi-decode.js +37 -0
- package/dist/esm/sdk/utils/index.js +1 -0
- package/dist/types/dev/create2.d.ts +2 -2
- package/dist/types/dev/mint/AbstractMinter.d.ts +3 -4
- package/dist/types/dev/mint/DealMinter.d.ts +0 -3
- package/dist/types/dev/mint/DirectMinter.d.ts +0 -3
- package/dist/types/dev/mint/TransferMinter.d.ts +0 -3
- package/dist/types/permissionless/bindings/address-provider.d.ts +4 -255
- package/dist/types/permissionless/bindings/bytecode-repository.d.ts +5 -6
- package/dist/types/permissionless/bindings/compressors/token-compressor.d.ts +3 -3
- package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +4 -5
- 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 +3 -4
- package/dist/types/permissionless/bindings/governance/governor.d.ts +6 -7
- 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 +0 -1
- package/dist/types/permissionless/bindings/instance-manager.d.ts +6 -7
- 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 +6 -7
- package/dist/types/permissionless/bindings/router/routing-manager.d.ts +4 -5
- package/dist/types/permissionless/bindings/treasury-splitter.d.ts +5 -6
- package/dist/types/permissionless/core/proposal.d.ts +1 -7
- 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 +0 -1
- 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 +2 -8
- package/dist/types/plugins/bots/deserializePartialLiquidationBotParams.d.ts +3 -0
- package/dist/types/sdk/GearboxSDK.d.ts +5 -76
- package/dist/types/sdk/accountMigration/types.d.ts +1 -2
- package/dist/types/sdk/accounts/types.d.ts +4 -3
- package/dist/types/sdk/base/BaseContract.d.ts +72 -28
- package/dist/types/sdk/base/ChainContractsRegister.d.ts +57 -0
- package/dist/types/sdk/base/Construct.d.ts +38 -0
- package/dist/types/sdk/base/PlaceholderContract.d.ts +2 -2
- package/dist/types/sdk/base/SDKConstruct.d.ts +2 -16
- package/dist/types/sdk/base/TokensMeta.d.ts +2 -3
- package/dist/types/sdk/base/index.d.ts +2 -1
- package/dist/types/sdk/base/types.d.ts +50 -0
- 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 +3 -4
- 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 +3 -4
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +3 -4
- 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 +1 -2
- package/dist/types/sdk/market/loss-policy/AliasLossPolicyV310Contract.d.ts +1 -0
- package/dist/types/sdk/market/loss-policy/LossPolicyContract.d.ts +2 -3
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +3 -12
- package/dist/types/sdk/market/oracle/types.d.ts +0 -10
- package/dist/types/sdk/market/pool/GaugeContract.d.ts +2 -3
- package/dist/types/sdk/market/pool/LinearInterestRateModelContract.d.ts +2 -3
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV300Contract.d.ts +2 -3
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -3
- package/dist/types/sdk/market/pool/PoolV300Contract.d.ts +4 -5
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +4 -5
- package/dist/types/sdk/market/pool/TumblerContract.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/AbstractLPPriceFeed.d.ts +3 -8
- package/dist/types/sdk/market/pricefeeds/AbstractPriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/BalancerStablePriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/BalancerWeightedPriceFeed.d.ts +2 -3
- 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 +2 -3
- package/dist/types/sdk/market/pricefeeds/CurveStablePriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/CurveUSDPriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/Erc4626PriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/ExternalPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/MellowLRTPriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/PendleTWAPPTPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/PriceFeedRef.d.ts +3 -4
- package/dist/types/sdk/market/pricefeeds/PriceFeedsRegister.d.ts +1 -2
- 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 +2 -3
- package/dist/types/sdk/market/pricefeeds/YearnPriceFeed.d.ts +2 -3
- package/dist/types/sdk/market/pricefeeds/ZeroPriceFeed.d.ts +2 -2
- package/dist/types/sdk/market/pricefeeds/types.d.ts +0 -5
- package/dist/types/sdk/router/AbstractRouterContract.d.ts +4 -1
- package/dist/types/sdk/router/types.d.ts +1 -2
- package/dist/types/sdk/sdk-legacy/core/creditAccount.d.ts +2 -2
- package/dist/types/sdk/utils/abi-decode.d.ts +10 -0
- package/dist/types/sdk/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/permissionless/bindings/base-contract.js +0 -173
- package/dist/cjs/permissionless/utils/abi-decoder.js +0 -72
- package/dist/cjs/sdk/base/AddressLabeller.js +0 -49
- package/dist/cjs/sdk/base/IAddressLabeller.js +0 -16
- package/dist/esm/permissionless/bindings/base-contract.js +0 -151
- package/dist/esm/permissionless/utils/abi-decoder.js +0 -50
- package/dist/esm/sdk/base/AddressLabeller.js +0 -25
- package/dist/esm/sdk/base/IAddressLabeller.js +0 -0
- package/dist/types/permissionless/bindings/base-contract.d.ts +0 -23
- package/dist/types/permissionless/utils/abi-decoder.d.ts +0 -13
- package/dist/types/sdk/base/AddressLabeller.d.ts +0 -11
- package/dist/types/sdk/base/IAddressLabeller.d.ts +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Abi, Address } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BaseContractArgs } 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,6 +11,7 @@ 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;
|
|
14
15
|
/**
|
|
15
16
|
* Mapping Token => [PriceFeed Address, stalenessPeriod]
|
|
16
17
|
*/
|
|
@@ -27,7 +28,7 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
27
28
|
* Mapping Token => Price in USD
|
|
28
29
|
*/
|
|
29
30
|
readonly reservePrices: PriceFeedAnswerMap;
|
|
30
|
-
constructor(sdk: GearboxSDK, args:
|
|
31
|
+
constructor(sdk: GearboxSDK, args: BaseContractArgs<abi>, data: PriceOracleData);
|
|
31
32
|
/**
|
|
32
33
|
* Returns main and reserve price feeds for given tokens
|
|
33
34
|
* @param tokens
|
|
@@ -35,11 +36,6 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
35
36
|
* @returns
|
|
36
37
|
*/
|
|
37
38
|
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>;
|
|
43
39
|
abstract onDemandPriceUpdates(creditFacade: Address, updates?: UpdatePriceFeedsResult): OnDemandPriceUpdates<PriceUpdateV310 | PriceUpdateV300>;
|
|
44
40
|
/**
|
|
45
41
|
* Gets main price for given token
|
|
@@ -84,11 +80,6 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
84
80
|
* @param reserve use reserve price feed instead of main
|
|
85
81
|
*/
|
|
86
82
|
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>;
|
|
92
83
|
/**
|
|
93
84
|
* All price feed tree nodes known to this oracle
|
|
94
85
|
*/
|
|
@@ -54,11 +54,6 @@ 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>;
|
|
62
57
|
/**
|
|
63
58
|
* Paired method to updatePrices, helps to update prices on all oracles in one multicall
|
|
64
59
|
*/
|
|
@@ -87,11 +82,6 @@ export interface IPriceOracleContract extends IBaseContract {
|
|
|
87
82
|
* @returns
|
|
88
83
|
*/
|
|
89
84
|
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>;
|
|
95
85
|
/**
|
|
96
86
|
* Converts previously obtained price updates into CreditFacade multicall entries
|
|
97
87
|
* @param creditFacade
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, PoolState, RateKeeperState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { GaugeStateHuman } from "../../types/index.js";
|
|
6
5
|
import { AddressMap } from "../../utils/index.js";
|
|
7
6
|
import type { IRateKeeperContract } from "./types.js";
|
|
@@ -353,7 +352,7 @@ export declare class GaugeContract extends BaseContract<abi> implements IRateKee
|
|
|
353
352
|
readonly epochFrozen: boolean;
|
|
354
353
|
readonly epochLastUpdate: number;
|
|
355
354
|
readonly rates: AddressMap<number>;
|
|
356
|
-
constructor(
|
|
355
|
+
constructor(options: ConstructOptions, pool: PoolState, gauge: RateKeeperState);
|
|
357
356
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
358
357
|
stateHuman(raw?: boolean): GaugeStateHuman;
|
|
359
358
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { BaseState } from "../../base/index.js";
|
|
1
|
+
import type { BaseState, ConstructOptions } from "../../base/index.js";
|
|
2
2
|
import { BaseContract } from "../../base/index.js";
|
|
3
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
3
|
import type { LinearInterestRateModelStateHuman } from "../../types/index.js";
|
|
5
4
|
import type { IInterestRateModelContract } from "./types.js";
|
|
6
5
|
declare const abi: readonly [{
|
|
@@ -103,7 +102,7 @@ export declare class LinearInterestRateModelContract extends BaseContract<abi> i
|
|
|
103
102
|
readonly Rslope2: number;
|
|
104
103
|
readonly Rslope3: number;
|
|
105
104
|
readonly isBorrowingMoreU2Forbidden: boolean;
|
|
106
|
-
constructor(
|
|
105
|
+
constructor(options: ConstructOptions, params: BaseState);
|
|
107
106
|
stateHuman(raw?: boolean): LinearInterestRateModelStateHuman;
|
|
108
107
|
}
|
|
109
108
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
6
5
|
import { AddressMap } from "../../utils/index.js";
|
|
7
6
|
declare const abi: readonly [{
|
|
@@ -442,7 +441,7 @@ type abi = typeof abi;
|
|
|
442
441
|
export declare class PoolQuotaKeeperV300Contract extends BaseContract<abi> implements IBaseContract {
|
|
443
442
|
readonly decimals: number;
|
|
444
443
|
readonly quotas: AddressMap<QuotaState>;
|
|
445
|
-
constructor(
|
|
444
|
+
constructor(options: ConstructOptions, pool: PoolState, pqk: QuotaKeeperState);
|
|
446
445
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
447
446
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
448
447
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
6
5
|
import { AddressMap } from "../../utils/index.js";
|
|
7
6
|
declare const abi: readonly [{
|
|
@@ -472,7 +471,7 @@ type abi = typeof abi;
|
|
|
472
471
|
export declare class PoolQuotaKeeperV310Contract extends BaseContract<abi> implements IBaseContract {
|
|
473
472
|
readonly decimals: number;
|
|
474
473
|
readonly quotas: AddressMap<QuotaState>;
|
|
475
|
-
constructor(
|
|
474
|
+
constructor(options: ConstructOptions, pool: PoolState, pqk: QuotaKeeperState);
|
|
476
475
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
477
476
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
478
477
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
6
5
|
import { AddressMap } from "../../utils/index.js";
|
|
7
6
|
declare const abi: readonly [{
|
|
@@ -1096,13 +1095,13 @@ declare const abi: readonly [{
|
|
|
1096
1095
|
readonly anonymous: false;
|
|
1097
1096
|
}];
|
|
1098
1097
|
type abi = typeof abi;
|
|
1099
|
-
export interface PoolV300Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams">, BaseContract<abi> {
|
|
1098
|
+
export interface PoolV300Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams" | "name">, BaseContract<abi> {
|
|
1100
1099
|
}
|
|
1101
1100
|
export declare class PoolV300Contract extends BaseContract<abi> {
|
|
1102
1101
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1103
|
-
constructor(
|
|
1102
|
+
constructor(options: ConstructOptions, data: PoolState);
|
|
1104
1103
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1105
1104
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1106
|
-
protected
|
|
1105
|
+
protected stringifyFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[];
|
|
1107
1106
|
}
|
|
1108
1107
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
6
5
|
import { AddressMap } from "../../utils/index.js";
|
|
7
6
|
declare const abi: readonly [{
|
|
@@ -1128,13 +1127,13 @@ declare const abi: readonly [{
|
|
|
1128
1127
|
readonly anonymous: false;
|
|
1129
1128
|
}];
|
|
1130
1129
|
type abi = typeof abi;
|
|
1131
|
-
export interface PoolV310Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams">, BaseContract<abi> {
|
|
1130
|
+
export interface PoolV310Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams" | "name">, BaseContract<abi> {
|
|
1132
1131
|
}
|
|
1133
1132
|
export declare class PoolV310Contract extends BaseContract<abi> {
|
|
1134
1133
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1135
|
-
constructor(
|
|
1134
|
+
constructor(options: ConstructOptions, data: PoolState);
|
|
1136
1135
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1137
1136
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1138
|
-
protected
|
|
1137
|
+
protected stringifyFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[];
|
|
1139
1138
|
}
|
|
1140
1139
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, PoolState, RateKeeperState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { TumblerStateHuman } from "../../types/index.js";
|
|
6
5
|
import { AddressMap } from "../../utils/index.js";
|
|
7
6
|
import type { IRateKeeperContract } from "./types.js";
|
|
@@ -183,7 +182,7 @@ type abi = typeof abi;
|
|
|
183
182
|
export declare class TumblerContract extends BaseContract<abi> implements IRateKeeperContract {
|
|
184
183
|
readonly epochLength: bigint;
|
|
185
184
|
readonly rates: AddressMap<number>;
|
|
186
|
-
constructor(
|
|
185
|
+
constructor(options: ConstructOptions, pool: PoolState, tumbler: RateKeeperState);
|
|
187
186
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
188
187
|
stateHuman(raw?: boolean): TumblerStateHuman;
|
|
189
188
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { Abi, Address, UnionOmit } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.js";
|
|
3
3
|
import type { LPPriceFeedStateHuman } from "../../types/state-human.js";
|
|
4
4
|
import { AbstractPriceFeedContract, type PriceFeedConstructorArgs } from "./AbstractPriceFeed.js";
|
|
5
|
-
|
|
6
|
-
export declare abstract class AbstractLPPriceFeedContract<const abi extends Abi | readonly unknown[]> extends AbstractPriceFeedContract<abi> implements ILPPriceFeedContract {
|
|
5
|
+
export declare abstract class AbstractLPPriceFeedContract<const abi extends Abi | readonly unknown[]> extends AbstractPriceFeedContract<abi> {
|
|
7
6
|
readonly lpContract: Address;
|
|
8
7
|
readonly lpToken: Address;
|
|
9
8
|
readonly lowerBound: bigint;
|
|
@@ -11,11 +10,7 @@ export declare abstract class AbstractLPPriceFeedContract<const abi extends Abi
|
|
|
11
10
|
readonly exchangeRate?: bigint;
|
|
12
11
|
readonly aggregatePrice?: bigint;
|
|
13
12
|
readonly scale?: bigint;
|
|
14
|
-
constructor(
|
|
15
|
-
abstract getValue(): Promise<bigint>;
|
|
16
|
-
getLowerBound(): Promise<bigint>;
|
|
17
|
-
currentLowerBound(): Promise<bigint>;
|
|
18
|
-
static toLowerBound(value: bigint): bigint;
|
|
13
|
+
constructor(options: ConstructOptions, args: PriceFeedConstructorArgs<abi>);
|
|
19
14
|
stateHuman(raw?: boolean): UnionOmit<LPPriceFeedStateHuman, "stalenessPeriod">;
|
|
20
15
|
}
|
|
21
16
|
export declare function isLPPriceFeed(priceFeed: unknown): priceFeed is AbstractLPPriceFeedContract<any>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Abi, RequiredBy, UnionOmit } from "viem";
|
|
2
|
-
import type { PriceFeedAnswer, PriceFeedTreeNode } from "../../base/index.js";
|
|
2
|
+
import type { ConstructOptions, PriceFeedAnswer, PriceFeedTreeNode } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
4
|
import type { PriceFeedStateHuman } from "../../types/index.js";
|
|
6
5
|
import { PriceFeedRef } from "./PriceFeedRef.js";
|
|
7
6
|
import type { IPriceFeedContract, IUpdatablePriceFeedContract, PriceFeedContractType } from "./types.js";
|
|
@@ -18,7 +17,7 @@ export declare abstract class AbstractPriceFeedContract<const abi extends Abi |
|
|
|
18
17
|
#private;
|
|
19
18
|
hasLowerBoundCap: boolean;
|
|
20
19
|
readonly description?: string;
|
|
21
|
-
constructor(
|
|
20
|
+
constructor(options: ConstructOptions, args: PriceFeedConstructorArgs<abi>);
|
|
22
21
|
get loaded(): boolean;
|
|
23
22
|
get decimals(): number;
|
|
24
23
|
get updatable(): boolean;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { bptStablePriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
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 { ConstructOptions } from "../../base/Construct.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,8 +18,7 @@ export declare class BalancerWeightedPriceFeedContract extends AbstractLPPriceFe
|
|
|
18
18
|
bigint,
|
|
19
19
|
bigint
|
|
20
20
|
];
|
|
21
|
-
constructor(
|
|
22
|
-
getValue(): Promise<bigint>;
|
|
21
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
23
22
|
stateHuman(raw?: boolean): UnionOmit<BalancerWeightedPriceFeedStateHuman, "stalenessPeriod">;
|
|
24
23
|
}
|
|
25
24
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { boundedPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(options: ConstructOptions, 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 { ConstructOptions } from "../../base/Construct.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(options: ConstructOptions, 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 { ConstructOptions } from "../../base/Construct.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(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
10
10
|
stateHuman(raw?: boolean): Omit<ConstantOracleStateHuman, "stalenessPeriod">;
|
|
11
11
|
}
|
|
12
12
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { curveCryptoLpPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { curveStableLpPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { curveUsdPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { erc4626PriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { chainlinkReadableAggregatorAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { mellowLrtPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.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(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
215
215
|
}
|
|
216
216
|
export {};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import {
|
|
3
|
-
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
2
|
+
import { Construct, type ConstructOptions } from "../../base/index.js";
|
|
4
3
|
import type { PriceFeedStateHuman } from "../../types/index.js";
|
|
5
4
|
import type { IPriceFeedContract } from "./types.js";
|
|
6
5
|
/**
|
|
7
6
|
* PriceFeedRef is a connector between price feed and oracle, e.g. oracle's entry for price feed + staleness period
|
|
8
7
|
*/
|
|
9
|
-
export declare class PriceFeedRef extends
|
|
8
|
+
export declare class PriceFeedRef extends Construct {
|
|
10
9
|
#private;
|
|
11
10
|
readonly address: Address;
|
|
12
11
|
readonly stalenessPeriod: number;
|
|
13
|
-
constructor(
|
|
12
|
+
constructor(options: ConstructOptions, address: Address, stalenessPeriod: number);
|
|
14
13
|
get priceFeed(): IPriceFeedContract;
|
|
15
14
|
stateHuman(raw?: boolean): PriceFeedStateHuman;
|
|
16
15
|
}
|
|
@@ -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 {
|
|
5
|
+
import type { 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,7 +28,6 @@ export interface LatestUpdate {
|
|
|
28
28
|
**/
|
|
29
29
|
export declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeedRegisterHooks> {
|
|
30
30
|
#private;
|
|
31
|
-
readonly logger?: ILogger;
|
|
32
31
|
readonly updaters: IPriceUpdater[];
|
|
33
32
|
constructor(sdk: GearboxSDK, opts?: PriceFeedRegisterOptions);
|
|
34
33
|
addHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: PriceFeedRegisterHooks[K]) => void | Promise<void>) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address, Hex } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.js";
|
|
3
3
|
import type { RawTx } from "../../types/index.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
@@ -222,7 +222,7 @@ export declare class PythPriceFeed extends AbstractPriceFeedContract<abi> implem
|
|
|
222
222
|
readonly priceFeedId: Hex;
|
|
223
223
|
readonly pyth: Address;
|
|
224
224
|
readonly maxConfToPriceRatio?: bigint;
|
|
225
|
-
constructor(
|
|
225
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
226
226
|
createPriceUpdateTx(data: `0x${string}`): RawTx;
|
|
227
227
|
}
|
|
228
228
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address, Hex } from "viem";
|
|
2
2
|
import { redstonePriceFeedAbi } from "../../abi/index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ConstructOptions } from "../../base/Construct.js";
|
|
4
4
|
import type { RawTx, RedstonePriceFeedStateHuman } from "../../types/index.js";
|
|
5
5
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
6
6
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
@@ -14,7 +14,7 @@ export declare class RedstonePriceFeedContract extends AbstractPriceFeedContract
|
|
|
14
14
|
readonly signersThreshold: number;
|
|
15
15
|
readonly lastPrice: bigint;
|
|
16
16
|
readonly lastPayloadTimestamp: number;
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
18
18
|
stateHuman(raw?: boolean): Omit<RedstonePriceFeedStateHuman, "stalenessPeriod">;
|
|
19
19
|
createPriceUpdateTx(data: `0x${string}`): RawTx;
|
|
20
20
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { wstEthPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof wstEthPriceFeedAbi;
|
|
6
6
|
export declare class WstETHPriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { yearnPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.js";
|
|
3
3
|
import { AbstractLPPriceFeedContract } from "./AbstractLPPriceFeed.js";
|
|
4
4
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof yearnPriceFeedAbi;
|
|
6
6
|
export declare class YearnPriceFeedContract extends AbstractLPPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
8
|
-
getValue(): Promise<bigint>;
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
9
8
|
}
|
|
10
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { zeroPriceFeedAbi } from "../../abi/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConstructOptions } from "../../base/Construct.js";
|
|
3
3
|
import type { PartialPriceFeedTreeNode } from "./AbstractPriceFeed.js";
|
|
4
4
|
import { AbstractPriceFeedContract } from "./AbstractPriceFeed.js";
|
|
5
5
|
type abi = typeof zeroPriceFeedAbi;
|
|
6
6
|
export declare class ZeroPriceFeedContract extends AbstractPriceFeedContract<abi> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(options: ConstructOptions, args: PartialPriceFeedTreeNode);
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -35,11 +35,6 @@ export interface IPriceFeedContract extends IBaseContract {
|
|
|
35
35
|
export interface IUpdatablePriceFeedContract extends IPriceFeedContract {
|
|
36
36
|
createPriceUpdateTx: (data: `0x${string}`) => RawTx;
|
|
37
37
|
}
|
|
38
|
-
export interface ILPPriceFeedContract extends IPriceFeedContract {
|
|
39
|
-
getValue: () => Promise<bigint>;
|
|
40
|
-
getLowerBound: () => Promise<bigint>;
|
|
41
|
-
currentLowerBound: () => Promise<bigint>;
|
|
42
|
-
}
|
|
43
38
|
export interface UpdatePriceFeedsResult {
|
|
44
39
|
txs: IPriceUpdateTx[];
|
|
45
40
|
timestamp: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Abi, Address } from "viem";
|
|
2
|
-
import { BaseContract } from "../base/index.js";
|
|
2
|
+
import { BaseContract, type BaseContractArgs } from "../base/index.js";
|
|
3
|
+
import type { GearboxSDK } from "../GearboxSDK.js";
|
|
3
4
|
import { AddressMap } from "../utils/index.js";
|
|
4
5
|
import type { IHooks } from "../utils/internal/index.js";
|
|
5
6
|
import { Hooks } from "../utils/internal/index.js";
|
|
@@ -13,6 +14,8 @@ export declare abstract class AbstractRouterContract<abi extends Abi | readonly
|
|
|
13
14
|
protected readonly hooks: Hooks<RouterHooks>;
|
|
14
15
|
readonly addHook: <K extends "foundPathOptions">(hookName: K, fn: (...args: RouterHooks[K]) => void | Promise<void>) => void;
|
|
15
16
|
readonly removeHook: <K extends "foundPathOptions">(hookName: K, fn: (...args: RouterHooks[K]) => void | Promise<void>) => void;
|
|
17
|
+
readonly sdk: GearboxSDK;
|
|
18
|
+
constructor(sdk: GearboxSDK, args: BaseContractArgs<abi>);
|
|
16
19
|
protected getExpectedAndLeftover(ca: RouterCASlice, cm: RouterCMSlice, balances?: Leftovers, keepAssets?: Address[]): Leftovers;
|
|
17
20
|
protected getDefaultExpectedAndLeftover(ca: RouterCASlice, keepAssets?: Address[]): Leftovers;
|
|
18
21
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import type { IBaseContract } from "../base/
|
|
3
|
-
import type { CreditAccountData } from "../base/types.js";
|
|
2
|
+
import type { CreditAccountData, IBaseContract } from "../base/index.js";
|
|
4
3
|
import type { MultiCall } from "../types/index.js";
|
|
5
4
|
import type { Leftovers } from "./AbstractRouterContract.js";
|
|
6
5
|
export type SwapOperation = "EXACT_INPUT" | "EXACT_INPUT_ALL" | "EXACT_OUTPUT";
|
|
@@ -133,8 +133,8 @@ export declare class CreditAccountData_Legacy {
|
|
|
133
133
|
constructor(payload: CreditAccountDataPayload);
|
|
134
134
|
static sortBalances(balances: Record<Address, bigint>, prices: Record<Address, bigint>, tokens: Record<Address, TokenData>): Array<[Address, bigint]>;
|
|
135
135
|
static sortAssets<T extends Asset>(balances: Array<T>, prices: Record<Address, bigint>, tokens: Record<Address, TokenData>): T[];
|
|
136
|
-
static assetComparator<T extends Asset>(t1: T, t2: T, prices1: Record<Address, bigint> | undefined, prices2: Record<Address, bigint> | undefined, tokens1: Record<Address, TokenData> | undefined, tokens2: Record<Address, TokenData> | undefined): 1 |
|
|
137
|
-
static tokensAbcComparator(t1?: TokenData, t2?: TokenData): 1 |
|
|
136
|
+
static assetComparator<T extends Asset>(t1: T, t2: T, prices1: Record<Address, bigint> | undefined, prices2: Record<Address, bigint> | undefined, tokens1: Record<Address, TokenData> | undefined, tokens2: Record<Address, TokenData> | undefined): 1 | 0 | -1;
|
|
137
|
+
static tokensAbcComparator(t1?: TokenData, t2?: TokenData): 1 | 0 | -1;
|
|
138
138
|
static amountAbcComparator(t1: bigint, t2: bigint): 1 | -1;
|
|
139
139
|
isForbidden(token: Address): boolean;
|
|
140
140
|
isQuoted(token: Address): boolean;
|