Skip to content

Commit

Permalink
feat(morpho-blue): adding morpho-blue pool computations
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrpl committed Feb 27, 2024
1 parent b6d0efa commit 3ed0044
Show file tree
Hide file tree
Showing 25 changed files with 6,564 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/adapters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { MorphoAaveV2OptimizerBorrowAdapter } from './morpho-aave-v2/products/op
import { MorphoAaveV2OptimizerSupplyAdapter } from './morpho-aave-v2/products/optimizer-supply/morphoAaveV2OptimizerSupplyAdapter'
import { MorphoAaveV3ETHOptimizerBorrowAdapter } from './morpho-aave-v3-eth/products/optimizer-borrow/morphoAaveV3ETHOptimizerBorrowAdapter'
import { MorphoAaveV3ETHOptimizerSupplyAdapter } from './morpho-aave-v3-eth/products/optimizer-supply/morphoAaveV3ETHOptimizerSupplyAdapter'
import { MorphoBlueMarketBorrowAdapter } from './morpho-blue/products/market-borrow/morphoBlueMarketBorrowAdapter'
import { MorphoBlueMarketSupplyAdapter } from './morpho-blue/products/market-supply/morphoBlueMarketSupplyAdapter'
import { MorphoCompoundV2OptimizerBorrowAdapter } from './morpho-compound-v2/products/optimizer-borrow/morphoCompoundV2OptimizerBorrowAdapter'
import { MorphoCompoundV2OptimizerSupplyAdapter } from './morpho-compound-v2/products/optimizer-supply/morphoCompoundV2OptimizerSupplyAdapter'
import { PricesV2UsdAdapter } from './prices-v2/products/usd/pricesV2UsdAdapter'
Expand All @@ -54,18 +56,21 @@ export const supportedProtocols: Record<
MorphoAaveV3ETHOptimizerBorrowAdapter,
],
},

[Protocol.MorphoAaveV2]: {
[Chain.Ethereum]: [
MorphoAaveV2OptimizerBorrowAdapter,
MorphoAaveV2OptimizerSupplyAdapter,
],
},

[Protocol.MorphoCompoundV2]: {
[Chain.Ethereum]: [
MorphoCompoundV2OptimizerSupplyAdapter,
MorphoCompoundV2OptimizerBorrowAdapter,
],
},

[Protocol.Stargate]: {
[Chain.Ethereum]: [StargatePoolAdapter, StargateVestingAdapter],
[Chain.Arbitrum]: [StargatePoolAdapter, StargateVestingAdapter],
Expand Down Expand Up @@ -221,4 +226,11 @@ export const supportedProtocols: Record<
[Chain.Arbitrum]: [UniswapV2PoolAdapter],
[Chain.Avalanche]: [UniswapV2PoolAdapter],
},

[Protocol.MorphoBlue]: {
[Chain.Ethereum]: [
MorphoBlueMarketSupplyAdapter,
MorphoBlueMarketBorrowAdapter,
],
},
}
2 changes: 2 additions & 0 deletions src/adapters/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { testCases as makerTestCases } from './maker/tests/testCases'
import { testCases as mendiFinanceTestCases } from './mendi-finance/tests/testCases'
import { testCases as morphoAaveV2TestCases } from './morpho-aave-v2/tests/testCases'
import { testCases as morphoAaveV3ETHOptimizerTestCases } from './morpho-aave-v3-eth/tests/testCases'
import { testCases as morphoBlueTestCases } from './morpho-blue/tests/testCases'
import { testCases as morphoCompoundV2OptimizerTestCases } from './morpho-compound-v2/tests/testCases'
import { testCases as pricesV2TestCases } from './prices-v2/tests/testCases'
import { Protocol } from './protocols'
Expand Down Expand Up @@ -65,6 +66,7 @@ function runAllTests() {
runProtocolTests(Protocol.RocketPool, rocketPoolTestCases)
runProtocolTests(Protocol.PricesV2, pricesV2TestCases)
runProtocolTests(Protocol.UniswapV2, uniswapV2TestCases)
runProtocolTests(Protocol.MorphoBlue, morphoBlueTestCases)
}

function runProtocolTests(protocolId: Protocol, testCases: TestCase[]) {
Expand Down
Loading

0 comments on commit 3ed0044

Please sign in to comment.