Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@oasisdex/automation

Package Overview
Dependencies
47
Maintainers
9
Versions
108
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.6.3 to 1.6.4-alpha.0

2

lib/src/index.d.ts
export { decodeTriggerData, decodeTriggerDataByType, decodeTriggerDataByTriggerType, encodeTriggerData, encodeTriggerDataByType, decodeTriggerDataAsJson, encodeTriggerDataByTriggerType, decodeTriggerDataByTypeAsJson, decodeTriggerDataByTriggerTypeAsJson, } from './abi-coding';
export { getCommandAddresses, commandTypeJsonMapping } from './mapping';
export { CommandContractType, TriggerType, TriggerGroupType, triggerTypeToCommandContractTypeMap, } from './types';
export { CommandContractType, TriggerType, TrailingStopLossTriggers, TriggerGroupType, triggerTypeToCommandContractTypeMap, } from './types';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.triggerTypeToCommandContractTypeMap = exports.TriggerGroupType = exports.TriggerType = exports.CommandContractType = exports.commandTypeJsonMapping = exports.getCommandAddresses = exports.decodeTriggerDataByTriggerTypeAsJson = exports.decodeTriggerDataByTypeAsJson = exports.encodeTriggerDataByTriggerType = exports.decodeTriggerDataAsJson = exports.encodeTriggerDataByType = exports.encodeTriggerData = exports.decodeTriggerDataByTriggerType = exports.decodeTriggerDataByType = exports.decodeTriggerData = void 0;
exports.triggerTypeToCommandContractTypeMap = exports.TriggerGroupType = exports.TrailingStopLossTriggers = exports.TriggerType = exports.CommandContractType = exports.commandTypeJsonMapping = exports.getCommandAddresses = exports.decodeTriggerDataByTriggerTypeAsJson = exports.decodeTriggerDataByTypeAsJson = exports.encodeTriggerDataByTriggerType = exports.decodeTriggerDataAsJson = exports.encodeTriggerDataByType = exports.encodeTriggerData = exports.decodeTriggerDataByTriggerType = exports.decodeTriggerDataByType = exports.decodeTriggerData = void 0;
var abi_coding_1 = require("./abi-coding");

@@ -20,4 +20,5 @@ Object.defineProperty(exports, "decodeTriggerData", { enumerable: true, get: function () { return abi_coding_1.decodeTriggerData; } });

Object.defineProperty(exports, "TriggerType", { enumerable: true, get: function () { return types_1.TriggerType; } });
Object.defineProperty(exports, "TrailingStopLossTriggers", { enumerable: true, get: function () { return types_1.TrailingStopLossTriggers; } });
Object.defineProperty(exports, "TriggerGroupType", { enumerable: true, get: function () { return types_1.TriggerGroupType; } });
Object.defineProperty(exports, "triggerTypeToCommandContractTypeMap", { enumerable: true, get: function () { return types_1.triggerTypeToCommandContractTypeMap; } });
//# sourceMappingURL=index.js.map

@@ -194,2 +194,26 @@ "use strict";

],
[types_1.CommandContractType.DmaSparkPartialTakeProfitCommandV2]: [
'positionAddress',
'triggerType',
'maxCoverage',
'debtToken',
'collateralToken',
'operationName',
'executionLtv',
'targetLtv',
'deviation',
'closeToCollateral',
],
[types_1.CommandContractType.DmaAavePartialTakeProfitCommandV2]: [
'positionAddress',
'triggerType',
'maxCoverage',
'debtToken',
'collateralToken',
'operationName',
'executionLtv',
'targetLtv',
'deviation',
'closeToCollateral',
],
};

@@ -294,16 +318,16 @@ exports.commandOffchainDataTypeJsonMapping = {

'0x3b7701897fd930fEa5A67E60019742b0cdAdfecD': {
type: types_1.CommandContractType.DmaAaveTrailingStopLossCommandV2
type: types_1.CommandContractType.DmaAaveTrailingStopLossCommandV2,
},
'0x2d43E84567019D721F095CfD632291c3eE868D8F': {
type: types_1.CommandContractType.DmaSparkTrailingStopLossCommandV2
type: types_1.CommandContractType.DmaSparkTrailingStopLossCommandV2,
},
'0xAc728f8248F8CaD0E0f10A2a4e648981EdA095A4': {
type: types_1.CommandContractType.DmaSparkStopLossCommandV2
type: types_1.CommandContractType.DmaSparkStopLossCommandV2,
},
'0x73022668d1E176f8aB56F0A988F358Dc9C8FFD15': {
type: types_1.CommandContractType.DmaSparkBasicBuyCommandV2
type: types_1.CommandContractType.DmaSparkBasicBuyCommandV2,
},
'0xA870Edf71E88847Cf8f292555C9Da6dE26Ba3470': {
type: types_1.CommandContractType.DmaSparkBasicSellCommandV2
}
type: types_1.CommandContractType.DmaSparkBasicSellCommandV2,
},
},

@@ -511,2 +535,26 @@ [types_1.EthereumNetwork.BASE]: {

],
[types_1.CommandContractType.DmaAavePartialTakeProfitCommandV2]: [
'address',
'uint16',
'uint256',
'address',
'address',
'bytes32',
'uint256',
'uint256',
'uint64',
'bool', // closeToCollateral
],
[types_1.CommandContractType.DmaSparkPartialTakeProfitCommandV2]: [
'address',
'uint16',
'uint256',
'address',
'address',
'bytes32',
'uint256',
'uint256',
'uint64',
'bool', // closeToCollateral
],
};

@@ -513,0 +561,0 @@ exports.defaultCommandOffchainDataTypeMapping = {

@@ -29,3 +29,5 @@ import { ethers } from 'ethers';

DmaSparkBasicBuyCommandV2 = "DmaSparkBasicBuyCommandV2",
DmaSparkBasicSellCommandV2 = "DmaSparkBasicSellCommandV2"
DmaSparkBasicSellCommandV2 = "DmaSparkBasicSellCommandV2",
DmaAavePartialTakeProfitCommandV2 = "DmaAaveV3PartialTakeProfitCommandV2",
DmaSparkPartialTakeProfitCommandV2 = "DmaSparkPartialTakeProfitCommandV2"
}

@@ -60,5 +62,8 @@ export declare enum TriggerType {

DmaSparkBasicSellV2 = 132,
DmaAavePartialTakeProfitV2 = 133,
DmaSparkPartialTakeProfitV2 = 134,
DmaAaveTrailingStopLossV2 = 10006,
DmaSparkTrailingStopLossV2 = 10007
}
export declare const TrailingStopLossTriggers: TriggerType[];
export declare const triggerTypeToCommandContractTypeMap: Record<TriggerType, CommandContractType>;

@@ -65,0 +70,0 @@ export declare enum TriggerGroupType {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TriggerGroupType = exports.triggerTypeToCommandContractTypeMap = exports.TriggerType = exports.CommandContractType = exports.EthereumNetwork = void 0;
exports.TriggerGroupType = exports.triggerTypeToCommandContractTypeMap = exports.TrailingStopLossTriggers = exports.TriggerType = exports.CommandContractType = exports.EthereumNetwork = void 0;
var EthereumNetwork;

@@ -34,2 +34,4 @@ (function (EthereumNetwork) {

CommandContractType["DmaSparkBasicSellCommandV2"] = "DmaSparkBasicSellCommandV2";
CommandContractType["DmaAavePartialTakeProfitCommandV2"] = "DmaAaveV3PartialTakeProfitCommandV2";
CommandContractType["DmaSparkPartialTakeProfitCommandV2"] = "DmaSparkPartialTakeProfitCommandV2";
})(CommandContractType = exports.CommandContractType || (exports.CommandContractType = {}));

@@ -65,5 +67,8 @@ var TriggerType;

TriggerType[TriggerType["DmaSparkBasicSellV2"] = 132] = "DmaSparkBasicSellV2";
TriggerType[TriggerType["DmaAavePartialTakeProfitV2"] = 133] = "DmaAavePartialTakeProfitV2";
TriggerType[TriggerType["DmaSparkPartialTakeProfitV2"] = 134] = "DmaSparkPartialTakeProfitV2";
TriggerType[TriggerType["DmaAaveTrailingStopLossV2"] = 10006] = "DmaAaveTrailingStopLossV2";
TriggerType[TriggerType["DmaSparkTrailingStopLossV2"] = 10007] = "DmaSparkTrailingStopLossV2";
})(TriggerType = exports.TriggerType || (exports.TriggerType = {}));
exports.TrailingStopLossTriggers = [TriggerType.DmaAaveTrailingStopLossV2, TriggerType.DmaSparkTrailingStopLossV2];
exports.triggerTypeToCommandContractTypeMap = {

@@ -99,2 +104,4 @@ [TriggerType.StopLossToCollateral]: CommandContractType.CloseCommand,

[TriggerType.DmaSparkBasicSellV2]: CommandContractType.DmaSparkBasicSellCommandV2,
[TriggerType.DmaAavePartialTakeProfitV2]: CommandContractType.DmaAavePartialTakeProfitCommandV2,
[TriggerType.DmaSparkPartialTakeProfitV2]: CommandContractType.DmaSparkPartialTakeProfitCommandV2,
};

@@ -101,0 +108,0 @@ var TriggerGroupType;

{
"name": "@oasisdex/automation",
"packageManager": "yarn@1.22.21",
"version": "1.6.3",
"version": "1.6.4-alpha.0",
"description": "The set of utilities for Oasis automation",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/OasisDEX/common#readme",

@@ -17,4 +17,5 @@ export {

TriggerType,
TrailingStopLossTriggers,
TriggerGroupType,
triggerTypeToCommandContractTypeMap,
} from './types';

@@ -199,2 +199,26 @@ import {

],
[CommandContractType.DmaSparkPartialTakeProfitCommandV2]: [
'positionAddress',
'triggerType',
'maxCoverage',
'debtToken',
'collateralToken',
'operationName',
'executionLtv',
'targetLtv',
'deviation',
'closeToCollateral',
],
[CommandContractType.DmaAavePartialTakeProfitCommandV2]: [
'positionAddress',
'triggerType',
'maxCoverage',
'debtToken',
'collateralToken',
'operationName',
'executionLtv',
'targetLtv',
'deviation',
'closeToCollateral',
],
};

@@ -303,16 +327,16 @@ export const commandOffchainDataTypeJsonMapping: Partial<Record<CommandContractType, string[]>> = {

'0x3b7701897fd930fEa5A67E60019742b0cdAdfecD': {
type: CommandContractType.DmaAaveTrailingStopLossCommandV2
type: CommandContractType.DmaAaveTrailingStopLossCommandV2,
},
'0x2d43E84567019D721F095CfD632291c3eE868D8F': {
type: CommandContractType.DmaSparkTrailingStopLossCommandV2
type: CommandContractType.DmaSparkTrailingStopLossCommandV2,
},
'0xAc728f8248F8CaD0E0f10A2a4e648981EdA095A4': {
type: CommandContractType.DmaSparkStopLossCommandV2
type: CommandContractType.DmaSparkStopLossCommandV2,
},
'0x73022668d1E176f8aB56F0A988F358Dc9C8FFD15': {
type: CommandContractType.DmaSparkBasicBuyCommandV2
type: CommandContractType.DmaSparkBasicBuyCommandV2,
},
'0xA870Edf71E88847Cf8f292555C9Da6dE26Ba3470': {
type: CommandContractType.DmaSparkBasicSellCommandV2
}
type: CommandContractType.DmaSparkBasicSellCommandV2,
},
},

@@ -433,4 +457,4 @@ [EthereumNetwork.BASE]: {

'bytes32', // operationName
'uint256', // execCollRatio
'uint256', // targetCollRatio
'uint256', // execLtv
'uint256', // targetLtv
'uint256', // maxBuyPrice

@@ -447,4 +471,4 @@ 'uint64', // deviation

'bytes32', // operationName
'uint256', // execCollRatio
'uint256', // targetCollRatio
'uint256', // execLtv
'uint256', // targetLtv
'uint256', // minSellPrice

@@ -507,4 +531,4 @@ 'uint64', // deviation

'bytes32', // operationName
'uint256', // execCollRatio
'uint256', // targetCollRatio
'uint256', // execLtv
'uint256', // targetLtv
'uint256', // maxBuyPrice

@@ -521,4 +545,4 @@ 'uint64', // deviation

'bytes32', // operationName
'uint256', // execCollRatio
'uint256', // targetCollRatio
'uint256', // execLtv
'uint256', // targetLtv
'uint256', // minSellPrice

@@ -528,2 +552,26 @@ 'uint64', // deviation

],
[CommandContractType.DmaAavePartialTakeProfitCommandV2]: [
'address', //positionAddress
'uint16', // triggerType
'uint256', // maxCoverage
'address', // debtToken
'address', // collateralToken
'bytes32', // operationName
'uint256', // execLtv
'uint256', // targetLtv
'uint64', // deviation
'bool', // closeToCollateral
],
[CommandContractType.DmaSparkPartialTakeProfitCommandV2]: [
'address', //positionAddress
'uint16', // triggerType
'uint256', // maxCoverage
'address', // debtToken
'address', // collateralToken
'bytes32', // operationName
'uint256', // execLtv
'uint256', // targetLtv
'uint64', // deviation
'bool', // closeToCollateral
],
} as const;

@@ -530,0 +578,0 @@

@@ -32,2 +32,4 @@ import { ethers } from 'ethers';

DmaSparkBasicSellCommandV2 = 'DmaSparkBasicSellCommandV2',
DmaAavePartialTakeProfitCommandV2 = 'DmaAaveV3PartialTakeProfitCommandV2',
DmaSparkPartialTakeProfitCommandV2 = 'DmaSparkPartialTakeProfitCommandV2',
}

@@ -63,2 +65,4 @@

DmaSparkBasicSellV2 = 132,
DmaAavePartialTakeProfitV2 = 133,
DmaSparkPartialTakeProfitV2 = 134,
DmaAaveTrailingStopLossV2 = 10006,

@@ -68,2 +72,4 @@ DmaSparkTrailingStopLossV2 = 10007,

export const TrailingStopLossTriggers = [TriggerType.DmaAaveTrailingStopLossV2, TriggerType.DmaSparkTrailingStopLossV2];
export const triggerTypeToCommandContractTypeMap: Record<TriggerType, CommandContractType> = {

@@ -99,2 +105,4 @@ [TriggerType.StopLossToCollateral]: CommandContractType.CloseCommand,

[TriggerType.DmaSparkBasicSellV2]: CommandContractType.DmaSparkBasicSellCommandV2,
[TriggerType.DmaAavePartialTakeProfitV2]: CommandContractType.DmaAavePartialTakeProfitCommandV2,
[TriggerType.DmaSparkPartialTakeProfitV2]: CommandContractType.DmaSparkPartialTakeProfitCommandV2,
};

@@ -101,0 +109,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc