Skip to content

Commit

Permalink
Merge pull request #117 from OasisDEX/jt/fix/mb-contract-bugs
Browse files Browse the repository at this point in the history
[Fix] Bump Morpho Trigger Ids
  • Loading branch information
zerotucks authored May 30, 2024
2 parents 8882fd9 + d5c318b commit 21168c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion packages/automation/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@oasisdex/automation",
"packageManager": "yarn@1.22.21",
"version": "1.6.5-morpho.5",
"version": "1.6.6",
"description": "The set of utilities for Oasis automation",
"homepage": "https://github.com/OasisDEX/common#readme",
"main": "lib/src/index.js",
Expand Down
16 changes: 0 additions & 16 deletions packages/automation/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ export const commandTypeJsonMapping: Record<CommandContractType, string[]> = {
'collateralToken',
'operationName',
'poolId',
'quoteDecimals',
'collateralDecimals',
'executionLtv',
'targetLtv',
'minSellPrice',
Expand All @@ -264,8 +262,6 @@ export const commandTypeJsonMapping: Record<CommandContractType, string[]> = {
'collateralToken',
'operationName',
'poolId',
'quoteDecimals',
'collateralDecimals',
'executionLtv',
'closeToCollateral',
],
Expand All @@ -277,8 +273,6 @@ export const commandTypeJsonMapping: Record<CommandContractType, string[]> = {
'collateralToken',
'operationName',
'poolId',
'quoteDecimals',
'collateralDecimals',
'executionLtv',
'targetLtv',
'executionPrice',
Expand All @@ -293,8 +287,6 @@ export const commandTypeJsonMapping: Record<CommandContractType, string[]> = {
'collateralToken',
'operationName',
'poolId',
'quoteDecimals',
'collateralDecimals',
'collateralOracle',
'collateralAddedRoundId',
'debtOracle',
Expand Down Expand Up @@ -729,8 +721,6 @@ export const defaultCommandTypeMapping: Record<CommandContractType, ParamDefinit
'address', // collateralToken
'bytes32', // operationName
'bytes32', // marketId
'uint8', // quote decimals
'uint8', // collateral decimals
'uint256', // execLtv
'uint256', // targetLtv
'uint256', // minSellPrice
Expand All @@ -745,8 +735,6 @@ export const defaultCommandTypeMapping: Record<CommandContractType, ParamDefinit
'address', // collateralToken
'bytes32', // operationName
'bytes32', // marketId
'uint8', // quote decimals
'uint8', // collateral decimals
'uint256', // executionLTV
'bool', // closeToCollateral
],
Expand All @@ -758,8 +746,6 @@ export const defaultCommandTypeMapping: Record<CommandContractType, ParamDefinit
'address', // collateralToken
'bytes32', // operationName
'bytes32', // marketId
'uint8', // quote decimals
'uint8', // collateral decimals
'uint256', // execLtv
'uint256', // targetLtv
'uint256', // executionPrice
Expand All @@ -774,8 +760,6 @@ export const defaultCommandTypeMapping: Record<CommandContractType, ParamDefinit
'address', // collateralToken
'bytes32', // operationName
'bytes32', // marketId
'uint8', // quote decimals
'uint8', // collateral decimals
'address', // collateralOracle
'uint80', // collateralAddedRoundId
'address', // debtOracle
Expand Down
15 changes: 10 additions & 5 deletions packages/automation/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ export enum TriggerType {
DmaSparkPartialTakeProfitV2 = 134,
DmaAaveTrailingStopLossV2 = 10006,
DmaSparkTrailingStopLossV2 = 10007,
DmaMorphoBlueBasicBuyV2 = 135,
DmaMorphoBlueBasicSellV2 = 136,
DmaMorphoBluePartialTakeProfitV2 = 137,
DmaMorphoBlueStopLossV2 = 138,
DmaMorphoBlueTrailingStopLossV2 = 10008,
// DmaMorphoBlueBasicBuyV2 = 135,
// DmaMorphoBlueBasicSellV2 = 136,
// DmaMorphoBluePartialTakeProfitV2 = 137,
// DmaMorphoBlueStopLossV2 = 138,
// DmaMorphoBlueTrailingStopLossV2 = 10008,
DmaMorphoBlueBasicBuyV2 = 139,
DmaMorphoBlueBasicSellV2 = 140,
DmaMorphoBluePartialTakeProfitV2 = 141,
DmaMorphoBlueStopLossV2 = 142,
DmaMorphoBlueTrailingStopLossV2 = 10009,
}

export const TrailingStopLossTriggers = [
Expand Down

0 comments on commit 21168c7

Please sign in to comment.