diff --git a/packages/automation/src/mapping.ts b/packages/automation/src/mapping.ts index cb3a50e..deaa32a 100644 --- a/packages/automation/src/mapping.ts +++ b/packages/automation/src/mapping.ts @@ -55,6 +55,14 @@ export const commandTypeJsonMapping: Record = { 'collateralToken', 'ltv', ], + [CommandContractType.SparkStopLossCommandV2]: [ + 'positionAddress', + 'triggerType', + 'maxCoverage', + 'debtToken', + 'collateralToken', + 'ltv', + ], [CommandContractType.MakerStopLossCommandV2]: [ 'cdpId', 'triggerType', @@ -200,6 +208,14 @@ export const defaultCommandTypeMapping = { 'address', 'uint256', ], + [CommandContractType.SparkStopLossCommandV2]: [ + 'address', + 'uint16', + 'uint256', + 'address', + 'address', + 'uint256', + ], [CommandContractType.MakerStopLossCommandV2]: ['uint256', 'uint16', 'uint256', 'uint256'], [CommandContractType.MakerAutoTakeProfitCommandV2]: ['uint256', 'uint16', 'uint256', 'uint32'], [CommandContractType.MakerBasicBuyCommandV2]: [ diff --git a/packages/automation/src/types.ts b/packages/automation/src/types.ts index dbd0493..71fea58 100644 --- a/packages/automation/src/types.ts +++ b/packages/automation/src/types.ts @@ -18,6 +18,7 @@ export enum CommandContractType { MakerAutoTakeProfitCommandV2 = 'MakerAutoTakeProfitCommandV2', MakerBasicBuyCommandV2 = 'MakerBasicBuyCommandV2', MakerBasicSellCommandV2 = 'MakerBasicSellCommandV2', + SparkStopLossCommandV2 = 'SparkStopLossCommandV2', } export enum TriggerType { @@ -42,6 +43,8 @@ export enum TriggerType { // AaveStopLossToDebtV2 = 110, AaveStopLossToCollateralV2 = 111, AaveStopLossToDebtV2 = 112, + SparkStopLossToCollateralV2 = 113, + SparkStopLossToDebtV2 = 114, } export enum TriggerGroupType {