Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add missing Compound function getSupplyRatePerBlock #181

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

iherger
Copy link
Member

@iherger iherger commented Oct 3, 2023

PR-Codex overview

Focus of the PR:

Add missing getSupplyRatePerBlock function to the CompoundV2 integration adapter.

Detailed summary:

  • Added getSupplyRatePerBlock function to the CompoundV2 integration adapter in packages/sdk/src/internal/Extensions/IntegrationAdapters/CompoundV2.ts
  • The function retrieves the supply rate per block for a given cToken by making a contract call using the Viem library.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2023

🦋 Changeset detected

Latest commit: 97cb36b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@enzymefinance/sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@commit-lint
Copy link

commit-lint bot commented Oct 3, 2023

Features

  • add missing Compound function getSupplyRatePerBlock (d9776a6)

Chore

Contributors

iherger

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Size Change: +18 B (0%)

Total Size: 222 kB

Filename Size Change
packages/sdk/dist/internal/Extensions/IntegrationAdapters/CompoundV2.js 1.63 kB +18 B (+1%)
ℹ️ View Unchanged
Filename Size
packages/abis/dist/abis/IAaveDebtPositionLib.js 562 B
packages/abis/dist/abis/IAaveDebtPositionParser.js 406 B
packages/abis/dist/abis/IAaveV2Adapter.js 619 B
packages/abis/dist/abis/IAaveV2ATokenListOwner.js 352 B
packages/abis/dist/abis/IAaveV3Adapter.js 631 B
packages/abis/dist/abis/IAaveV3ATokenListOwner.js 348 B
packages/abis/dist/abis/IAaveV3DebtPositionLib.js 589 B
packages/abis/dist/abis/IAaveV3DebtPositionParser.js 421 B
packages/abis/dist/abis/IAddressListRegistry.js 822 B
packages/abis/dist/abis/IAllowedAdapterIncomingAssetsPolicy.js 664 B
packages/abis/dist/abis/IAllowedAdaptersPerManagerPolicy.js 692 B
packages/abis/dist/abis/IAllowedAdaptersPolicy.js 652 B
packages/abis/dist/abis/IAllowedAssetsForRedemptionPolicy.js 664 B
packages/abis/dist/abis/IAllowedDepositRecipientsPolicy.js 656 B
packages/abis/dist/abis/IAllowedExternalPositionTypesPerManagerPolicy.js 712 B
packages/abis/dist/abis/IAllowedExternalPositionTypesPolicy.js 613 B
packages/abis/dist/abis/IAllowedSharesTransferRecipientsPolicy.js 662 B
packages/abis/dist/abis/IArbitraryLoanPositionLib.js 682 B
packages/abis/dist/abis/IArbitraryLoanPositionParser.js 386 B
packages/abis/dist/abis/IArbitraryLoanTotalNominalDeltaOracleModule.js 642 B
packages/abis/dist/abis/IArbitraryTokenPhasedSharesWrapperFactory.js 551 B
packages/abis/dist/abis/IArbitraryTokenPhasedSharesWrapperLib.js 1.32 kB
packages/abis/dist/abis/IArbitraryTokenPhasedSharesWrapperProxy.js 293 B
packages/abis/dist/abis/IArbitraryValueOracle.js 307 B
packages/abis/dist/abis/IAssetValueCalculator.js 379 B
packages/abis/dist/abis/IAuraBalancerV2LpStakingAdapter.js 666 B
packages/abis/dist/abis/IAuraBalancerV2LpStakingWrapperFactory.js 607 B
packages/abis/dist/abis/IAuraBalancerV2LpStakingWrapperPriceFeed.js 401 B
packages/abis/dist/abis/IBalancerV2GaugeTokenPriceFeed.js 376 B
packages/abis/dist/abis/IBalancerV2LiquidityAdapter.js 713 B
packages/abis/dist/abis/IBalancerV2StablePoolPriceFeed.js 669 B
packages/abis/dist/abis/IBalancerV2WeightedPoolPriceFeed.js 574 B
packages/abis/dist/abis/IChainlinkPriceFeedMixin.js 544 B
packages/abis/dist/abis/ICompoundAdapter.js 670 B
packages/abis/dist/abis/ICompoundDebtPositionLib.js 599 B
packages/abis/dist/abis/ICompoundDebtPositionParser.js 486 B
packages/abis/dist/abis/ICompoundPriceFeed.js 528 B
packages/abis/dist/abis/ICompoundV3Adapter.js 656 B
packages/abis/dist/abis/ICompoundV3CTokenListOwner.js 349 B
packages/abis/dist/abis/IComptrollerLib.js 1.58 kB
packages/abis/dist/abis/IConvexCurveLpStakingAdapter.js 726 B
packages/abis/dist/abis/IConvexCurveLpStakingWrapperFactory.js 603 B
packages/abis/dist/abis/IConvexCurveLpStakingWrapperLib.js 1.35 kB
packages/abis/dist/abis/IConvexCurveLpStakingWrapperPriceFeed.js 400 B
packages/abis/dist/abis/IConvexVotingPositionLib.js 451 B
packages/abis/dist/abis/IConvexVotingPositionParser.js 402 B
packages/abis/dist/abis/ICumulativeSlippageTolerancePolicy.js 979 B
packages/abis/dist/abis/ICurveExchangeAdapter.js 632 B
packages/abis/dist/abis/ICurveLiquidityAdapter.js 763 B
packages/abis/dist/abis/ICurvePriceFeed.js 893 B
packages/abis/dist/abis/IDepositWrapper.js 471 B
packages/abis/dist/abis/IDerivativePriceFeed.js 333 B
packages/abis/dist/abis/IDispatcher.js 1.04 kB
packages/abis/dist/abis/IEntranceRateBurnFee.js 681 B
packages/abis/dist/abis/IEntranceRateDirectFee.js 705 B
packages/abis/dist/abis/IERC4626Adapter.js 583 B
packages/abis/dist/abis/IERC4626PriceFeed.js 360 B
packages/abis/dist/abis/IExitRateBurnFee.js 725 B
packages/abis/dist/abis/IExitRateDirectFee.js 749 B
packages/abis/dist/abis/IExternalPosition.js 331 B
packages/abis/dist/abis/IExternalPositionFactory.js 679 B
packages/abis/dist/abis/IExternalPositionManager.js 793 B
packages/abis/dist/abis/IExternalPositionProxy.js 405 B
packages/abis/dist/abis/IExternalPositionVault.js 271 B
packages/abis/dist/abis/IFee.js 538 B
packages/abis/dist/abis/IFeeManager.js 726 B
packages/abis/dist/abis/IFundDataProviderRouter.js 421 B
packages/abis/dist/abis/IFundDeployer.js 1.49 kB
packages/abis/dist/abis/IFundValueCalculator.js 551 B
packages/abis/dist/abis/IFundValueCalculatorRouter.js 629 B
packages/abis/dist/abis/IFundValueCalculatorUsdWrapper.js 522 B
packages/abis/dist/abis/IGasRelayPaymasterFactory.js 452 B
packages/abis/dist/abis/IGasRelayPaymasterLib.js 1.12 kB
packages/abis/dist/abis/IGatedRedemptionQueueSharesWrapperFactory.js 631 B
packages/abis/dist/abis/IGatedRedemptionQueueSharesWrapperLib.js 1.85 kB
packages/abis/dist/abis/IGlobalConfigLib.js 630 B
packages/abis/dist/abis/IHelperDataReader.js 937 B
packages/abis/dist/abis/IHelperDataReaderRouter.js 634 B
packages/abis/dist/abis/IIdleAdapter.js 626 B
packages/abis/dist/abis/IIdlePriceFeed.js 538 B
packages/abis/dist/abis/IIntegrationAdapter.js 392 B
packages/abis/dist/abis/IIntegrationManager.js 667 B
packages/abis/dist/abis/IKilnStakingPositionLib.js 564 B
packages/abis/dist/abis/IKilnStakingPositionParser.js 554 B
packages/abis/dist/abis/ILidoWithdrawalsPositionLib.js 562 B
packages/abis/dist/abis/ILiquityDebtPositionLib.js 409 B
packages/abis/dist/abis/ILiquityDebtPositionParser.js 436 B
packages/abis/dist/abis/IManagementFee.js 774 B
packages/abis/dist/abis/IManualValueOracleFactory.js 374 B
packages/abis/dist/abis/IManualValueOracleLib.js 572 B
packages/abis/dist/abis/IMapleLiquidityPositionLib.js 635 B
packages/abis/dist/abis/IMapleLiquidityPositionParser.js 430 B
packages/abis/dist/abis/IMapleV1ToV2PoolMapper.js 510 B
packages/abis/dist/abis/IMigrationHookHandler.js 361 B
packages/abis/dist/abis/IMinAssetBalancesPostRedemptionPolicy.js 625 B
packages/abis/dist/abis/IMinMaxInvestmentPolicy.js 676 B
packages/abis/dist/abis/IMinSharesSupplyFee.js 635 B
packages/abis/dist/abis/INoDepegOnRedeemSharesForSpecificAssetsPolicy.js 738 B
packages/abis/dist/abis/INotionalV3PositionLib.js 393 B
packages/abis/dist/abis/IOnlyRemoveDustExternalPositionPolicy.js 835 B
packages/abis/dist/abis/IOnlyUntrackDustOrPricelessAssetsPolicy.js 831 B
packages/abis/dist/abis/IParaSwapV5Adapter.js 740 B
packages/abis/dist/abis/IPerformanceFee.js 770 B
packages/abis/dist/abis/IPolicy.js 463 B
packages/abis/dist/abis/IPolicyManager.js 761 B
packages/abis/dist/abis/IProtocolFeeReserveLib.js 594 B
packages/abis/dist/abis/IProtocolFeeTracker.js 612 B
packages/abis/dist/abis/IRevertingPriceFeed.js 337 B
packages/abis/dist/abis/ISharesSplitterFactory.js 387 B
packages/abis/dist/abis/ISharesSplitterLib.js 622 B
packages/abis/dist/abis/ISolvV2BondBuyerPositionLib.js 598 B
packages/abis/dist/abis/ISolvV2BondBuyerPositionParser.js 418 B
packages/abis/dist/abis/ISolvV2BondIssuerPositionLib.js 520 B
packages/abis/dist/abis/ISolvV2BondIssuerPositionParser.js 425 B
packages/abis/dist/abis/IStakeWiseV3StakingPositionLib.js 643 B
packages/abis/dist/abis/IStakeWiseV3StakingPositionParser.js 507 B
packages/abis/dist/abis/IStakingWrapper.js 648 B
packages/abis/dist/abis/ISynthetixAdapter.js 693 B
packages/abis/dist/abis/ITheGraphDelegationPositionLib.js 522 B
packages/abis/dist/abis/ITheGraphDelegationPositionParser.js 405 B
packages/abis/dist/abis/IUintListRegistry.js 822 B
packages/abis/dist/abis/IUniswapV2ExchangeAdapter.js 604 B
packages/abis/dist/abis/IUniswapV2LiquidityAdapter.js 635 B
packages/abis/dist/abis/IUniswapV2PoolPriceFeed.js 655 B
packages/abis/dist/abis/IUniswapV3Adapter.js 596 B
packages/abis/dist/abis/IUniswapV3LiquidityPositionLib.js 578 B
packages/abis/dist/abis/IUniswapV3LiquidityPositionParser.js 472 B
packages/abis/dist/abis/IUnpermissionedActionsWrapper.js 400 B
packages/abis/dist/abis/IValueInterpreter.js 881 B
packages/abis/dist/abis/IVaultCore.js 293 B
packages/abis/dist/abis/IVaultLib.js 1.72 kB
packages/abis/dist/abis/IWstethPriceFeed.js 383 B
packages/abis/dist/abis/IYearnVaultV2Adapter.js 614 B
packages/abis/dist/abis/IYearnVaultV2PriceFeed.js 568 B
packages/abis/dist/index.js 3.31 kB
packages/api/dist/client.js 554 B
packages/api/dist/generated/enzyme/enzyme/v1/asset_amount_pb.js 805 B
packages/api/dist/generated/enzyme/enzyme/v1/asset_balance_pb.js 740 B
packages/api/dist/generated/enzyme/enzyme/v1/asset_item_pb.js 980 B
packages/api/dist/generated/enzyme/enzyme/v1/asset_value_pb.js 893 B
packages/api/dist/generated/enzyme/enzyme/v1/depositor_item_pb.js 950 B
packages/api/dist/generated/enzyme/enzyme/v1/depositor_time_series_item_pb.js 859 B
packages/api/dist/generated/enzyme/enzyme/v1/enums_pb.js 2.98 kB
packages/api/dist/generated/enzyme/enzyme/v1/enzyme_connect.js 1.11 kB
packages/api/dist/generated/enzyme/enzyme/v1/enzyme_pb.js 4.48 kB
packages/api/dist/generated/enzyme/enzyme/v1/external_position_item_pb.js 3.39 kB
packages/api/dist/generated/enzyme/enzyme/v1/fee_configuration_pb.js 1.71 kB
packages/api/dist/generated/enzyme/enzyme/v1/manager_time_series_item_pb.js 851 B
packages/api/dist/generated/enzyme/enzyme/v1/network_time_series_item_pb.js 855 B
packages/api/dist/generated/enzyme/enzyme/v1/policy_configuration_pb.js 3.99 kB
packages/api/dist/generated/enzyme/enzyme/v1/portfolio_asset_item_pb.js 949 B
packages/api/dist/generated/enzyme/enzyme/v1/time_window_pb.js 747 B
packages/api/dist/generated/enzyme/enzyme/v1/vault_activities_pb.js 7.64 kB
packages/api/dist/generated/enzyme/enzyme/v1/vault_list_item_pb.js 1.31 kB
packages/api/dist/generated/enzyme/enzyme/v1/vault_time_series_item_pb.js 948 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/asset_balance_pb.js 745 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/asset_item_pb.js 984 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/depositor_item_pb.js 954 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/depositor_time_series_item_pb.js 862 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/enums_pb.js 2.02 kB
packages/api/dist/generated/enzyme/enzyme/v1alpha/enzyme_connect.js 1.08 kB
packages/api/dist/generated/enzyme/enzyme/v1alpha/enzyme_pb.js 4.29 kB
packages/api/dist/generated/enzyme/enzyme/v1alpha/external_position_item_pb.js 798 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/fee_configuration_pb.js 1.71 kB
packages/api/dist/generated/enzyme/enzyme/v1alpha/manager_time_series_item_pb.js 858 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/network_time_series_item_pb.js 862 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/policy_configuration_pb.js 4 kB
packages/api/dist/generated/enzyme/enzyme/v1alpha/portfolio_asset_item_pb.js 954 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/time_window_pb.js 752 B
packages/api/dist/generated/enzyme/enzyme/v1alpha/vault_list_item_pb.js 1.31 kB
packages/api/dist/generated/enzyme/enzyme/v1alpha/vault_time_series_item_pb.js 953 B
packages/api/dist/index.js 313 B
packages/api/dist/protobuf.js 675 B
packages/sdk/dist/Assets.js 1.5 kB
packages/sdk/dist/Deposit.js 1.42 kB
packages/sdk/dist/Fees.js 1.24 kB
packages/sdk/dist/index.js 787 B
packages/sdk/dist/internal/Extensions.js 714 B
packages/sdk/dist/internal/Extensions/ExternalPositions.js 1.04 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/AaveV2Debt.js 1.51 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/ArbitraryLoan.js 1.45 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/CompoundV2Debt.js 1.44 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/ConvexVoting.js 1.93 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/Kiln.js 1.4 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/Liquity.js 1.85 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/MapleLiquidity.js 1.55 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/StakeWise.js 1.25 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/TheGraphDelegation.js 1.45 kB
packages/sdk/dist/internal/Extensions/ExternalPositions/UniswapV3Liquidity.js 1.45 kB
packages/sdk/dist/internal/Extensions/Fees.js 817 B
packages/sdk/dist/internal/Extensions/Fees/Entrance.js 551 B
packages/sdk/dist/internal/Extensions/Fees/Exit.js 569 B
packages/sdk/dist/internal/Extensions/Fees/Management.js 1.1 kB
packages/sdk/dist/internal/Extensions/Fees/Performance.js 942 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters.js 983 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters/AaveV2.js 971 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters/AaveV3.js 971 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters/BalancerV2Liquidity.js 2.12 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/CompoundV3.js 1.09 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/ConvexCurveLpStaking.js 2.11 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/CurveExchange.js 1.6 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/CurveLiquidity.js 3.2 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/Erc4626.js 984 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters/IdleV4.js 1.97 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/OneInchV5.js 1.12 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/ParaswapV5.js 1.69 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/UniswapV2Exchange.js 903 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters/UniswapV2Liquidity.js 2.26 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/UniswapV3.js 919 B
packages/sdk/dist/internal/Extensions/IntegrationAdapters/YearnVaultV2.js 1.1 kB
packages/sdk/dist/internal/Extensions/IntegrationAdapters/ZeroExV4.js 1.5 kB
packages/sdk/dist/internal/Extensions/Policies.js 1.02 kB
packages/sdk/dist/internal/Extensions/Policies/AllowedExternalPositionTypes.js 399 B
packages/sdk/dist/internal/Extensions/Policies/CumulativeSlippageTolerance.js 1.29 kB
packages/sdk/dist/internal/Extensions/Policies/MinAssetBalancesPostRedemption.js 565 B
packages/sdk/dist/internal/Extensions/Policies/MinMaxInvestment.js 973 B
packages/sdk/dist/internal/ExternalPositionManager.js 1.1 kB
packages/sdk/dist/internal/FeeManager.js 885 B
packages/sdk/dist/internal/IntegrationManager.js 883 B
packages/sdk/dist/internal/PolicyManager.js 580 B
packages/sdk/dist/internal/Tools/GatedRedemptionQueueSharesWrapper.js 784 B
packages/sdk/dist/internal/Tools/SharesSplitter.js 719 B
packages/sdk/dist/internal/Utils/address.js 391 B
packages/sdk/dist/internal/Utils/assertion.js 220 B
packages/sdk/dist/internal/Utils/bigint.js 242 B
packages/sdk/dist/internal/Utils/constants.js 208 B
packages/sdk/dist/internal/Utils/conversion.js 471 B
packages/sdk/dist/internal/Utils/hex.js 258 B
packages/sdk/dist/internal/Utils/rates.js 837 B
packages/sdk/dist/internal/Utils/slippage.js 329 B
packages/sdk/dist/internal/Utils/types.js 126 B
packages/sdk/dist/internal/Utils/viem.js 507 B
packages/sdk/dist/internal/VoteDelegation.js 810 B
packages/sdk/dist/Migration.js 841 B
packages/sdk/dist/Performance.js 864 B
packages/sdk/dist/Policies.js 863 B
packages/sdk/dist/Portfolio.js 1.68 kB
packages/sdk/dist/Relayer.js 798 B
packages/sdk/dist/Tools.js 650 B
packages/sdk/dist/Utils.js 795 B
packages/sdk/dist/Vault.js 894 B

compressed-size-action

@gabrocheleau gabrocheleau merged commit baccb53 into main Oct 3, 2023
9 checks passed
@gabrocheleau gabrocheleau deleted the feat/compound-missing-function branch October 3, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants