Socket
Socket
Sign inDemoInstall

@oasisdex/automation

Package Overview
Dependencies
Maintainers
11
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oasisdex/automation - npm Package Compare versions

Comparing version 1.5.0-alpha.1 to 1.5.0-alpha.2

7

lib/src/mapping.d.ts

@@ -7,6 +7,11 @@ import { CommandContractInfo, CommandContractType, ParamDefinition } from './types';

readonly SimpleAAVESell: readonly ["address", "uint16", "uint256", "uint256", "address"];
readonly AutoTakeProfitCommand: readonly ["uint256", "uint16", "uint256", "uint32"];
readonly AutoTakeProfitCommand: readonly ["uint256", "uint16", "uint32"];
readonly BasicBuyCommand: readonly ["uint256", "uint16", "uint256", "uint256", "uint256", "bool", "uint64", "uint32"];
readonly BasicSellCommand: readonly ["uint256", "uint16", "uint256", "uint256", "uint256", "bool", "uint64", "uint32"];
readonly AaveStopLossCommand: readonly ["address", "uint16", "address", "address", "uint256"];
readonly AaveStopLossCommandV2: readonly ["address", "uint16", "uint256", "address", "address", "uint256"];
readonly MakerCloseCommandV2: readonly ["uint256", "uint16", "uint256", "uint256"];
readonly MakerAutoTakeProfitCommandV2: readonly ["uint256", "uint16", "uint256", "uint32"];
readonly MakerBasicBuyCommandV2: readonly ["uint256", "uint16", "uint256", "uint256", "uint256", "uint256", "bool", "uint64", "uint32"];
readonly MakerBasicSellCommandV2: readonly ["uint256", "uint16", "uint256", "uint256", "uint256", "uint256", "bool", "uint64", "uint32"];
};

@@ -13,0 +18,0 @@ export declare function getCommandAddresses(network: number): Record<CommandContractType, string[]>;

@@ -47,2 +47,40 @@ "use strict";

],
[types_1.CommandContractType.AaveStopLossCommandV2]: [
'positionAddress',
'triggerType',
'maxCoverage',
'collateralToken',
'debtToken',
'ltv',
],
[types_1.CommandContractType.MakerCloseCommandV2]: ['cdpId', 'triggerType', 'maxCoverage', 'collRatio'],
[types_1.CommandContractType.MakerBasicBuyCommandV2]: [
'cdpId',
'triggerType',
'maxCoverage',
'execCollRatio',
'targetCollRatio',
'maxBuyPrice',
'continuous',
'deviation',
'maxBaseFeeInGwei',
],
[types_1.CommandContractType.MakerBasicSellCommandV2]: [
'cdpId',
'triggerType',
'maxCoverage',
'execCollRatio',
'targetCollRatio',
'minSellPrice',
'continuous',
'deviation',
'maxBaseFeeInGwei',
],
[types_1.CommandContractType.MakerAutoTakeProfitCommandV2]: [
'cdpId',
'triggerType',
'maxCoverage',
'executionPrice',
'maxBaseFeeInGwei',
],
};

@@ -115,3 +153,3 @@ exports.commandAddressMapping = Object.fromEntries(Object.entries({

],
[types_1.CommandContractType.AutoTakeProfitCommand]: ['uint256', 'uint16', 'uint256', 'uint32'],
[types_1.CommandContractType.AutoTakeProfitCommand]: ['uint256', 'uint16', 'uint32'],
[types_1.CommandContractType.BasicBuyCommand]: [

@@ -138,2 +176,34 @@ 'uint256',

[types_1.CommandContractType.AaveStopLossCommand]: ['address', 'uint16', 'address', 'address', 'uint256'],
[types_1.CommandContractType.AaveStopLossCommandV2]: [
'address',
'uint16',
'uint256',
'address',
'address',
'uint256',
],
[types_1.CommandContractType.MakerCloseCommandV2]: ['uint256', 'uint16', 'uint256', 'uint256'],
[types_1.CommandContractType.MakerAutoTakeProfitCommandV2]: ['uint256', 'uint16', 'uint256', 'uint32'],
[types_1.CommandContractType.MakerBasicBuyCommandV2]: [
'uint256',
'uint16',
'uint256',
'uint256',
'uint256',
'uint256',
'bool',
'uint64',
'uint32',
],
[types_1.CommandContractType.MakerBasicSellCommandV2]: [
'uint256',
'uint16',
'uint256',
'uint256',
'uint256',
'uint256',
'bool',
'uint64',
'uint32',
],
};

@@ -140,0 +210,0 @@ function getCommandAddresses(network) {

import { ethers } from 'ethers';
export declare enum EthereumNetwork {
MAINNET = 1,
GOERLI = 5
GOERLI = 5,
OPTIMISM = 10
}

@@ -12,3 +13,8 @@ export declare enum CommandContractType {

SimpleAAVESellCommand = "SimpleAAVESell",
AaveStopLossCommand = "AaveStopLossCommand"
AaveStopLossCommand = "AaveStopLossCommand",
AaveStopLossCommandV2 = "AaveStopLossCommandV2",
MakerCloseCommandV2 = "MakerCloseCommandV2",
MakerAutoTakeProfitCommandV2 = "MakerAutoTakeProfitCommandV2",
MakerBasicBuyCommandV2 = "MakerBasicBuyCommandV2",
MakerBasicSellCommandV2 = "MakerBasicSellCommandV2"
}

@@ -24,3 +30,11 @@ export declare enum TriggerType {

AaveStopLossToCollateral = 10,
AaveStopLossToDebt = 11
AaveStopLossToDebt = 11,
MakerStopLossToCollateralV2 = 101,
MakerStopLossToDaiV2 = 102,
MakerBasicBuyV2 = 103,
MakerBasicSellV2 = 104,
MakerAutoTakeProfitToCollateralV2 = 105,
MakerAutoTakeProfitToDaiV2 = 106,
AaveStopLossToCollateralV2 = 107,
AaveStopLossToDebtV2 = 108
}

@@ -27,0 +41,0 @@ export declare enum TriggerGroupType {

@@ -8,2 +8,3 @@ "use strict";

EthereumNetwork[EthereumNetwork["GOERLI"] = 5] = "GOERLI";
EthereumNetwork[EthereumNetwork["OPTIMISM"] = 10] = "OPTIMISM";
})(EthereumNetwork = exports.EthereumNetwork || (exports.EthereumNetwork = {}));

@@ -18,2 +19,7 @@ var CommandContractType;

CommandContractType["AaveStopLossCommand"] = "AaveStopLossCommand";
CommandContractType["AaveStopLossCommandV2"] = "AaveStopLossCommandV2";
CommandContractType["MakerCloseCommandV2"] = "MakerCloseCommandV2";
CommandContractType["MakerAutoTakeProfitCommandV2"] = "MakerAutoTakeProfitCommandV2";
CommandContractType["MakerBasicBuyCommandV2"] = "MakerBasicBuyCommandV2";
CommandContractType["MakerBasicSellCommandV2"] = "MakerBasicSellCommandV2";
})(CommandContractType = exports.CommandContractType || (exports.CommandContractType = {}));

@@ -31,2 +37,10 @@ var TriggerType;

TriggerType[TriggerType["AaveStopLossToDebt"] = 11] = "AaveStopLossToDebt";
TriggerType[TriggerType["MakerStopLossToCollateralV2"] = 101] = "MakerStopLossToCollateralV2";
TriggerType[TriggerType["MakerStopLossToDaiV2"] = 102] = "MakerStopLossToDaiV2";
TriggerType[TriggerType["MakerBasicBuyV2"] = 103] = "MakerBasicBuyV2";
TriggerType[TriggerType["MakerBasicSellV2"] = 104] = "MakerBasicSellV2";
TriggerType[TriggerType["MakerAutoTakeProfitToCollateralV2"] = 105] = "MakerAutoTakeProfitToCollateralV2";
TriggerType[TriggerType["MakerAutoTakeProfitToDaiV2"] = 106] = "MakerAutoTakeProfitToDaiV2";
TriggerType[TriggerType["AaveStopLossToCollateralV2"] = 107] = "AaveStopLossToCollateralV2";
TriggerType[TriggerType["AaveStopLossToDebtV2"] = 108] = "AaveStopLossToDebtV2";
})(TriggerType = exports.TriggerType || (exports.TriggerType = {}));

@@ -33,0 +47,0 @@ var TriggerGroupType;

4

package.json
{
"name": "@oasisdex/automation",
"version": "1.5.0-alpha.1",
"version": "1.5.0-alpha.2",
"description": "The set of utilities for Oasis automation",

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

},
"gitHead": "4d70eef3b31bf730b80a1f537559a222962fc534"
"gitHead": "1f5539dff9511052f1c679526ce753a492dfa6a7"
}

@@ -6,2 +6,4 @@ # `automation`

Automation V2 triggers start with id = 101.
## Usage

@@ -8,0 +10,0 @@

@@ -6,2 +6,3 @@ import { ethers } from 'ethers';

GOERLI = 5,
OPTIMISM = 10,
}

@@ -8,0 +9,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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc