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: morpho blue renaming #299

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
137e04a
fix: move vault ID to Maker position ID (#186)
robercano Apr 24, 2024
1c0ed24
Merge branch 'dev' into feature/refinance-non-ajna
robercano Apr 25, 2024
7b3348c
feat: refactor lending pool data type into single pair (#204)
robercano May 2, 2024
99d38c9
feat: add getLendingPoolInfo to retrieve extra info (#217)
robercano May 2, 2024
8bac286
feat: add tokens service (#218)
robercano May 2, 2024
37a827d
Merge branch 'dev' into feature/refinance-non-ajna
robercano May 3, 2024
ccd7098
feat: add oracle service (#219)
robercano May 3, 2024
97896e5
Merge branch 'dev' into feature/refinance-non-ajna
robercano May 6, 2024
8943f06
feat: add spark and aave action builders
paszkowskiDamian May 7, 2024
6781ebb
feat: add emode category
paszkowskiDamian May 7, 2024
14c3ae6
feat: add open position step
paszkowskiDamian May 8, 2024
4c43c46
feat: add action builders for open position
paszkowskiDamian May 8, 2024
f64c9b1
feat: open step
paszkowskiDamian May 8, 2024
ea8baa7
refactor: improve simulator types (1st iteration)
paszkowskiDamian May 8, 2024
ed40bd0
refactor: resolve types
paszkowskiDamian May 13, 2024
11655cf
refactor: fix all reducers to follow new state interface
paszkowskiDamian May 13, 2024
e325eff
refactor: add name to steps
paszkowskiDamian May 13, 2024
35a765e
chore: create new test
paszkowskiDamian May 13, 2024
94b8eb8
fix: types
paszkowskiDamian May 13, 2024
a8f2adb
Merge branch 'dev' into damianpaszkowski/aavelike-plugins
robercano May 13, 2024
7ccf90c
fix: e2e tests
robercano May 13, 2024
9c19a5b
Merge branch 'dev' into damianpaszkowski/aavelike-plugins
robercano May 15, 2024
015a6cb
fix: build
robercano May 16, 2024
d725f4d
Merge branch 'dev' into damianpaszkowski/aavelike-plugins
robercano May 16, 2024
1b82946
fix: cicheck
robercano May 16, 2024
23353d8
feat: add unit tests
robercano May 16, 2024
ea5306f
feat: add more unit tests
robercano May 16, 2024
bde8d6a
Merge branch 'dev' into damianpaszkowski/aavelike-plugins
robercano May 16, 2024
be36dc3
fix: format
robercano May 16, 2024
1e37a27
feat: add e2e Refinance AaveV3 Spark
robercano May 16, 2024
bef7459
Merge branch 'dev' into damianpaszkowski/aavelike-plugins
robercano May 16, 2024
261509e
feat: fix tests
robercano May 16, 2024
3515e42
feat: refactor action builder into classes
robercano May 16, 2024
f44772f
fix: disable e2e test
robercano May 16, 2024
72db237
Merge branch 'damianpaszkowski/aavelike-plugins' into rc/sc-15195/ope…
robercano May 16, 2024
e8bd5a3
feat: convert action builders to classes
robercano May 17, 2024
40e8b29
wip: initial version for operation definitions gen
robercano May 23, 2024
8fdc8a2
feat: operation definition tool
robercano May 24, 2024
572802b
Merge branch 'dev' into rc/sc-15195/operation-definitions-tool
robercano May 24, 2024
af2daa2
Merge branch 'dev' into rc/sc-15195/operation-definitions-tool
robercano May 24, 2024
8b405f0
fix: cicheck
robercano May 24, 2024
8982130
chore: rename Morpho to MorphoBlue
robercano May 24, 2024
d30d0c2
fix: change how strategy name is generated
robercano May 24, 2024
13e44ae
Merge branch 'rc/sc-15195/operation-definitions-tool' into rc/morpho-…
robercano May 24, 2024
b8b4b12
fix: build
robercano May 24, 2024
44b1e0d
fix: aws-cdk version issue
robercano May 24, 2024
fa22fe7
feat: add format option
robercano May 24, 2024
8721330
feat: accept skippable actions in order planner
robercano May 24, 2024
87ba13b
chore: cleanup
robercano May 24, 2024
e40a1f7
chore: cleanup
robercano May 24, 2024
5565920
chore: cleanup
robercano May 24, 2024
1a57f56
fix: disable e2e test
robercano May 24, 2024
293dd0b
chore: cleanup
robercano May 24, 2024
8d9fd3b
fix: refinance maker spark test
robercano May 24, 2024
5f2c1ed
Merge branch 'dev' into rc/sc-15195/operation-definitions-tool
robercano May 24, 2024
b645154
Merge branch 'rc/sc-15195/operation-definitions-tool' into rc/enable-…
robercano May 24, 2024
04d2ee9
Merge branch 'rc/enable-optional-actions' into rc/morpho-blue-renaming
robercano May 24, 2024
e2e9b4b
Merge branch 'dev' into rc/sc-15195/operation-definitions-tool
robercano May 27, 2024
9548f0b
Merge branch 'rc/sc-15195/operation-definitions-tool' into rc/enable-…
robercano May 27, 2024
ec008bb
Merge branch 'rc/enable-optional-actions' into rc/morpho-blue-renaming
robercano May 27, 2024
e374960
fix: address PR comments
robercano May 27, 2024
82259fa
fix: Address PR comments
robercano May 27, 2024
2888a5a
Merge branch 'rc/sc-15195/operation-definitions-tool' into rc/enable-…
robercano May 27, 2024
2ec1f83
Merge branch 'dev' into rc/enable-optional-actions
robercano May 27, 2024
bb7c7d9
Merge branch 'rc/enable-optional-actions' into rc/morpho-blue-renaming
robercano May 27, 2024
f49985b
fix: remove unused simulation types
robercano May 27, 2024
d282634
Merge branch 'rc/enable-optional-actions' into rc/morpho-blue-renaming
robercano May 27, 2024
c39aead
Merge branch 'dev' into rc/morpho-blue-renaming
robercano May 27, 2024
b7f9f90
Merge branch 'dev' into rc/morpho-blue-renaming
robercano Jun 3, 2024
8b5b387
Merge branch 'dev' into rc/morpho-blue-renaming
robercano Jun 4, 2024
3ab6fea
Merge branch 'dev' into rc/morpho-blue-renaming
robercano Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/protocol-plugins/src/plugins/ProtocolPluginsRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ProtocolName } from '@summerfi/sdk-common/protocols'
import { ProtocolPluginsRecordType } from '../implementation/ProtocolPluginsRegistry'
import { AaveV3ProtocolPlugin } from './aave-v3/implementation/AAVEv3ProtocolPlugin'
import { MakerProtocolPlugin } from './maker/implementation/MakerProtocolPlugin'
import { MorphoProtocolPlugin } from './morphoblue/implementation/MorphoProtocolPlugin'
import { MorphoBlueProtocolPlugin } from './morphoblue/implementation/MorphoBlueProtocolPlugin'
import { SparkProtocolPlugin } from './spark/implementation/SparkProtocolPlugin'

/**
Expand All @@ -14,5 +14,5 @@ export const ProtocolPluginsRecord: ProtocolPluginsRecordType = {
[ProtocolName.Maker]: MakerProtocolPlugin,
[ProtocolName.Spark]: SparkProtocolPlugin,
[ProtocolName.AaveV3]: AaveV3ProtocolPlugin,
[ProtocolName.MorphoBlue]: MorphoProtocolPlugin,
[ProtocolName.MorphoBlue]: MorphoBlueProtocolPlugin,
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { ActionCall, BaseAction, InputSlotsMapping } from '@summerfi/protocol-plugins-common'
import { ITokenAmount } from '@summerfi/sdk-common/common'
import { IMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { MorphoLLTVPrecision } from '../constants/MorphoConstants'
import { MorphoMarketParametersAbi } from '../types/MorphoMarketParameters'
import { IMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { MorphoBlueLLTVPrecision } from '../constants/MorphoBlueConstants'
import { MorphoBlueMarketParametersAbi } from '../types/MorphoBlueMarketParameters'

export class MorphoBorrowAction extends BaseAction<typeof MorphoBorrowAction.Config> {
export class MorphoBlueBorrowAction extends BaseAction<typeof MorphoBlueBorrowAction.Config> {
public static readonly Config = {
name: 'MorphoBlueBorrow',
version: 0,
parametersAbi: ['(MarketParams marketParams, uint256 amount)', MorphoMarketParametersAbi],
parametersAbi: ['(MarketParams marketParams, uint256 amount)', MorphoBlueMarketParametersAbi],
storageInputs: [],
storageOutputs: ['borrowedAmount'],
} as const

public encodeCall(
params: { morphoLendingPool: IMorphoLendingPool; amount: ITokenAmount },
params: { morphoLendingPool: IMorphoBlueLendingPool; amount: ITokenAmount },
paramsMapping?: InputSlotsMapping,
): ActionCall {
const { morphoLendingPool, amount } = params
Expand All @@ -28,7 +28,7 @@ export class MorphoBorrowAction extends BaseAction<typeof MorphoBorrowAction.Con
oracle: morphoLendingPool.oracle.value,
irm: morphoLendingPool.irm.value,
lltv: BigInt(
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoLLTVPrecision }),
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoBlueLLTVPrecision }),
),
},
amount: BigInt(amount.toBaseUnit()),
Expand All @@ -39,6 +39,6 @@ export class MorphoBorrowAction extends BaseAction<typeof MorphoBorrowAction.Con
}

public get config() {
return MorphoBorrowAction.Config
return MorphoBlueBorrowAction.Config
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { ActionCall, BaseAction, InputSlotsMapping } from '@summerfi/protocol-plugins-common'
import { ITokenAmount } from '@summerfi/sdk-common/common'
import { MorphoLLTVPrecision } from '../constants/MorphoConstants'
import { IMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { MorphoMarketParametersAbi } from '../types/MorphoMarketParameters'
import { MorphoBlueLLTVPrecision } from '../constants/MorphoBlueConstants'
import { IMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { MorphoBlueMarketParametersAbi } from '../types/MorphoBlueMarketParameters'

export class MorphoDepositAction extends BaseAction<typeof MorphoDepositAction.Config> {
export class MorphoBlueDepositAction extends BaseAction<typeof MorphoBlueDepositAction.Config> {
public static readonly Config = {
name: 'MorphoBlueDeposit',
version: 0,
parametersAbi: [
'(MarketParams marketParams, uint256 amount, bool sumAmounts)',
MorphoMarketParametersAbi,
MorphoBlueMarketParametersAbi,
],
storageInputs: ['marketParams', 'amount', 'sumAmounts'],
storageOutputs: ['depositedAmount'],
} as const

public encodeCall(
params: {
morphoLendingPool: IMorphoLendingPool
morphoLendingPool: IMorphoBlueLendingPool
amount: ITokenAmount
sumAmounts: boolean
},
Expand All @@ -35,7 +35,7 @@ export class MorphoDepositAction extends BaseAction<typeof MorphoDepositAction.C
oracle: morphoLendingPool.oracle.value,
irm: morphoLendingPool.irm.value,
lltv: BigInt(
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoLLTVPrecision }),
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoBlueLLTVPrecision }),
),
},
amount: BigInt(amount.toBaseUnit()),
Expand All @@ -47,6 +47,6 @@ export class MorphoDepositAction extends BaseAction<typeof MorphoDepositAction.C
}

public get config() {
return MorphoDepositAction.Config
return MorphoBlueDepositAction.Config
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { ActionCall, BaseAction, InputSlotsMapping } from '@summerfi/protocol-plugins-common'
import { ITokenAmount } from '@summerfi/sdk-common/common'
import { MorphoLLTVPrecision } from '../constants/MorphoConstants'
import { MorphoBlueLLTVPrecision } from '../constants/MorphoBlueConstants'
import { IAddress } from '@summerfi/sdk-common'
import { IMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { MorphoMarketParametersAbi } from '../types/MorphoMarketParameters'
import { IMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { MorphoBlueMarketParametersAbi } from '../types/MorphoBlueMarketParameters'

export class MorphoPaybackAction extends BaseAction<typeof MorphoPaybackAction.Config> {
export class MorphoBluePaybackAction extends BaseAction<typeof MorphoBluePaybackAction.Config> {
public static readonly Config = {
name: 'MorphoBluePayback',
version: 2,
parametersAbi: [
'(MarketParams marketParams, uint256 amount, address onBehalf, bool paybackAll)',
MorphoMarketParametersAbi,
MorphoBlueMarketParametersAbi,
],
storageInputs: ['amount'],
storageOutputs: ['paybackedAmount'],
} as const

public encodeCall(
params: {
morphoLendingPool: IMorphoLendingPool
morphoLendingPool: IMorphoBlueLendingPool
amount: ITokenAmount
onBehalf: IAddress
paybackAll: boolean
Expand All @@ -37,7 +37,7 @@ export class MorphoPaybackAction extends BaseAction<typeof MorphoPaybackAction.C
oracle: morphoLendingPool.oracle.value,
irm: morphoLendingPool.irm.value,
lltv: BigInt(
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoLLTVPrecision }),
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoBlueLLTVPrecision }),
),
},
amount: BigInt(amount.toBaseUnit()),
Expand All @@ -50,6 +50,6 @@ export class MorphoPaybackAction extends BaseAction<typeof MorphoPaybackAction.C
}

public get config() {
return MorphoPaybackAction.Config
return MorphoBluePaybackAction.Config
}
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { ActionCall, BaseAction, InputSlotsMapping } from '@summerfi/protocol-plugins-common'
import { ITokenAmount } from '@summerfi/sdk-common/common'
import { MorphoLLTVPrecision } from '../constants/MorphoConstants'
import { MorphoBlueLLTVPrecision } from '../constants/MorphoBlueConstants'
import { IAddress } from '@summerfi/sdk-common'
import { IMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { MorphoMarketParametersAbi } from '../types/MorphoMarketParameters'
import { IMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { MorphoBlueMarketParametersAbi } from '../types/MorphoBlueMarketParameters'

export class MorphoWithdrawAction extends BaseAction<typeof MorphoWithdrawAction.Config> {
export class MorphoBlueWithdrawAction extends BaseAction<typeof MorphoBlueWithdrawAction.Config> {
public static readonly Config = {
name: 'MorphoBlueWithdraw',
version: 0,
parametersAbi: [
'(MarketParams marketParams, uint256 amount, address to)',
MorphoMarketParametersAbi,
MorphoBlueMarketParametersAbi,
],
storageInputs: ['marketParams', 'amount', 'to'],
storageOutputs: ['withdrawnAmount'],
} as const

public encodeCall(
params: {
morphoLendingPool: IMorphoLendingPool
morphoLendingPool: IMorphoBlueLendingPool
amount: ITokenAmount
to: IAddress
},
Expand All @@ -36,7 +36,7 @@ export class MorphoWithdrawAction extends BaseAction<typeof MorphoWithdrawAction
oracle: morphoLendingPool.oracle.value,
irm: morphoLendingPool.irm.value,
lltv: BigInt(
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoLLTVPrecision }),
morphoLendingPool.lltv.toLTV().toBaseUnit({ decimals: MorphoBlueLLTVPrecision }),
),
},
amount: BigInt(amount.toBaseUnit()),
Expand All @@ -48,6 +48,6 @@ export class MorphoWithdrawAction extends BaseAction<typeof MorphoWithdrawAction
}

public get config() {
return MorphoWithdrawAction.Config
return MorphoBlueWithdrawAction.Config
}
}
8 changes: 4 additions & 4 deletions sdk/protocol-plugins/src/plugins/morphoblue/actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './MorphoBorrowAction'
export * from './MorphoDepositAction'
export * from './MorphoPaybackAction'
export * from './MorphoWithdrawAction'
export * from './MorphoBlueBorrowAction'
export * from './MorphoBlueDepositAction'
export * from './MorphoBluePaybackAction'
export * from './MorphoBlueWithdrawAction'
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ import {
getValueFromReference,
TokenTransferTargetType,
} from '@summerfi/sdk-common/simulation'
import { MorphoBorrowAction } from '../actions/MorphoBorrowAction'
import { MorphoDepositAction } from '../actions/MorphoDepositAction'
import { MorphoBlueBorrowAction } from '../actions/MorphoBlueBorrowAction'
import { MorphoBlueDepositAction } from '../actions/MorphoBlueDepositAction'
import { ActionBuilderParams, ActionBuilderUsedAction } from '@summerfi/protocol-plugins-common'
import { SendTokenAction, SetApprovalAction } from '../../common'
import { isMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { isMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { BaseActionBuilder } from '../../../implementation/BaseActionBuilder'

export class MorphoDepositBorrowActionBuilder extends BaseActionBuilder<steps.DepositBorrowStep> {
export class MorphoBlueDepositBorrowActionBuilder extends BaseActionBuilder<steps.DepositBorrowStep> {
readonly actions: ActionBuilderUsedAction[] = [
{ action: SetApprovalAction },
{ action: MorphoDepositAction },
{ action: MorphoBorrowAction, isOptionalTags: ['borrowAmount'] },
{ action: MorphoBlueDepositAction },
{ action: MorphoBlueBorrowAction, isOptionalTags: ['borrowAmount'] },
{ action: SendTokenAction, isOptionalTags: ['borrowAmount', 'borrowTargetType'] },
]

async build(params: ActionBuilderParams<steps.DepositBorrowStep>): Promise<void> {
const { context, user, step, addressBookManager } = params

if (!isMorphoLendingPool(step.inputs.position.pool)) {
if (!isMorphoBlueLendingPool(step.inputs.position.pool)) {
throw new Error('Invalid Morpho lending pool id')
}

Expand All @@ -47,7 +47,7 @@ export class MorphoDepositBorrowActionBuilder extends BaseActionBuilder<steps.De

context.addActionCall({
step: params.step,
action: new MorphoDepositAction(),
action: new MorphoBlueDepositAction(),
arguments: {
morphoLendingPool: step.inputs.position.pool,
amount: getValueFromReference(step.inputs.depositAmount),
Expand All @@ -65,7 +65,7 @@ export class MorphoDepositBorrowActionBuilder extends BaseActionBuilder<steps.De

context.addActionCall({
step: step,
action: new MorphoBorrowAction(),
action: new MorphoBlueBorrowAction(),
arguments: {
morphoLendingPool: step.inputs.position.pool,
amount: borrowAmount,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { steps } from '@summerfi/sdk-common/simulation'
import { ActionBuilderParams, ActionBuilderUsedAction } from '@summerfi/protocol-plugins-common'
import { isMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { isMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { BaseActionBuilder } from '../../../implementation/BaseActionBuilder'

export class MorphoOpenPositionActionBuilder extends BaseActionBuilder<steps.OpenPosition> {
export class MorphoBlueOpenPositionActionBuilder extends BaseActionBuilder<steps.OpenPosition> {
readonly actions: ActionBuilderUsedAction[] = [
// Empty on purpose, no definition needs to be generated for this builder
]

async build(params: ActionBuilderParams<steps.OpenPosition>): Promise<void> {
const { step } = params

if (!isMorphoLendingPool(step.inputs.pool)) {
if (!isMorphoBlueLendingPool(step.inputs.pool)) {
throw new Error('Invalid Morpho lending pool id')
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { getValueFromReference, steps } from '@summerfi/sdk-common/simulation'
import { ActionBuilderParams, ActionBuilderUsedAction } from '@summerfi/protocol-plugins-common'
import { isMorphoLendingPool } from '../interfaces/IMorphoLendingPool'
import { MorphoPaybackAction, MorphoWithdrawAction } from '../actions'
import { isMorphoBlueLendingPool } from '../interfaces/IMorphoBlueLendingPool'
import { MorphoBluePaybackAction, MorphoBlueWithdrawAction } from '../actions'
import { SetApprovalAction } from '../../common'
import { BaseActionBuilder } from '../../../implementation/BaseActionBuilder'

export class MorphoPaybackWithdrawActionBuilder extends BaseActionBuilder<steps.PaybackWithdrawStep> {
export class MorphoBluePaybackWithdrawActionBuilder extends BaseActionBuilder<steps.PaybackWithdrawStep> {
readonly actions: ActionBuilderUsedAction[] = [
{ action: SetApprovalAction, isOptionalTags: ['paybackAmount'] },
{ action: MorphoPaybackAction, isOptionalTags: ['paybackAmount'] },
{ action: MorphoWithdrawAction },
{ action: MorphoBluePaybackAction, isOptionalTags: ['paybackAmount'] },
{ action: MorphoBlueWithdrawAction },
]

async build(params: ActionBuilderParams<steps.PaybackWithdrawStep>): Promise<void> {
const { context, positionsManager, step, addressBookManager, user } = params

if (!isMorphoLendingPool(step.inputs.position.pool)) {
if (!isMorphoBlueLendingPool(step.inputs.position.pool)) {
throw new Error('Invalid Morpho lending pool id')
}

Expand Down Expand Up @@ -44,7 +44,7 @@ export class MorphoPaybackWithdrawActionBuilder extends BaseActionBuilder<steps.

context.addActionCall({
step: params.step,
action: new MorphoPaybackAction(),
action: new MorphoBluePaybackAction(),
arguments: {
morphoLendingPool: step.inputs.position.pool,
amount: getValueFromReference(step.inputs.paybackAmount),
Expand All @@ -62,7 +62,7 @@ export class MorphoPaybackWithdrawActionBuilder extends BaseActionBuilder<steps.

context.addActionCall({
step: step,
action: new MorphoWithdrawAction(),
action: new MorphoBlueWithdrawAction(),
arguments: {
morphoLendingPool: step.inputs.position.pool,
amount: step.inputs.withdrawAmount,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ActionBuildersMap } from '@summerfi/protocol-plugins-common'
import { MorphoBlueDepositBorrowActionBuilder } from './MorphoBlueDepositBorrowActionBuilder'
import { SimulationSteps } from '@summerfi/sdk-common/simulation'
import { MorphoBluePaybackWithdrawActionBuilder } from './MorphoBluePaybackWithdrawActionBuilder'
import { MorphoBlueOpenPositionActionBuilder } from './MorphoBlueOpenPositionActionBuilder'

export const MorphoBlueStepBuilders: Partial<ActionBuildersMap> = {
[SimulationSteps.DepositBorrow]: MorphoBlueDepositBorrowActionBuilder,
[SimulationSteps.PaybackWithdraw]: MorphoBluePaybackWithdrawActionBuilder,
[SimulationSteps.OpenPosition]: MorphoBlueOpenPositionActionBuilder,
}

This file was deleted.

8 changes: 4 additions & 4 deletions sdk/protocol-plugins/src/plugins/morphoblue/builders/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './MorphoDepositBorrowActionBuilder'
export * from './MorphoPaybackWithdrawActionBuilder'
export * from './MorphoOpenPositionActionBuilder'
export * from './MorphoStepBuilders'
export * from './MorphoBlueDepositBorrowActionBuilder'
export * from './MorphoBluePaybackWithdrawActionBuilder'
export * from './MorphoBlueOpenPositionActionBuilder'
export * from './MorphoBlueStepBuilders'
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Precision for the LLTV value in MarketParams
*/
export const MorphoLLTVPrecision = 18
export const MorphoBlueLLTVPrecision = 18

/**
* Precision for the price coming from the oracle in MarketParams
*/
export const MorphoOraclePricePrecision = 36
export const MorphoBlueOraclePricePrecision = 36
Loading
Loading