@oasisdex/automation
Advanced tools
Comparing version 1.5.9-alpha5 to 1.6.0-alpha.1
@@ -19,2 +19,4 @@ import { CommandContractInfo, CommandContractType, ParamDefinition, TriggerType } from './types'; | ||
readonly AaveBasicSellCommandV2: readonly ["address", "uint16", "uint256", "address", "address", "bytes32", "uint256", "uint256", "uint256", "uint64", "uint32"]; | ||
readonly AaveStopLossCommandV2_2: readonly ["address", "uint16", "uint256", "address", "address", "bytes32", "uint256"]; | ||
readonly SparkStopLossCommandV2_2: readonly ["address", "uint16", "uint256", "address", "address", "bytes32", "uint256"]; | ||
}; | ||
@@ -21,0 +23,0 @@ export declare function getCommandAddresses(network: number): Record<CommandContractType, string[]>; |
@@ -102,3 +102,3 @@ "use strict"; | ||
'collateralToken', | ||
'opHash', | ||
'opName', | ||
'execLtv', | ||
@@ -116,3 +116,3 @@ 'targetLtv', | ||
'collateralToken', | ||
'opHash', | ||
'opName', | ||
'execLtv', | ||
@@ -124,2 +124,20 @@ 'targetLtv', | ||
], | ||
[types_1.CommandContractType.AaveStopLossCommandV2_2]: [ | ||
'positionAddress', | ||
'triggerType', | ||
'maxCoverage', | ||
'debtToken', | ||
'collateralToken', | ||
'opName', | ||
'ltv', | ||
], | ||
[types_1.CommandContractType.SparkStopLossCommandV2_2]: [ | ||
'positionAddress', | ||
'triggerType', | ||
'maxCoverage', | ||
'debtToken', | ||
'collateralToken', | ||
'opName', | ||
'ltv', | ||
], | ||
}; | ||
@@ -200,2 +218,10 @@ exports.commandAddressMapping = Object.fromEntries(Object.entries({ | ||
}, | ||
[types_1.EthereumNetwork.BASE]: { | ||
'0xb7CB13e4cD2D64e739b5746563978Ab7ee36B064': { | ||
type: types_1.CommandContractType.AaveBasicBuyCommandV2, | ||
}, | ||
'0xbf566C1b260F0464f75470C146288283f11219a9': { | ||
type: types_1.CommandContractType.AaveBasicSellCommandV2, | ||
}, | ||
}, | ||
}).map(([network, mapping]) => [ | ||
@@ -300,2 +326,20 @@ network, | ||
], | ||
[types_1.CommandContractType.AaveStopLossCommandV2_2]: [ | ||
'address', | ||
'uint16', | ||
'uint256', | ||
'address', | ||
'address', | ||
'bytes32', | ||
'uint256', // executionLTV | ||
], | ||
[types_1.CommandContractType.SparkStopLossCommandV2_2]: [ | ||
'address', | ||
'uint16', | ||
'uint256', | ||
'address', | ||
'address', | ||
'bytes32', | ||
'uint256', // executionLTV | ||
], | ||
}; | ||
@@ -302,0 +346,0 @@ function getCommandAddresses(network) { |
@@ -5,3 +5,5 @@ import { ethers } from 'ethers'; | ||
GOERLI = 5, | ||
OPTIMISM = 10 | ||
OPTIMISM = 10, | ||
BASE = 8453, | ||
ARBITRUM = 42161 | ||
} | ||
@@ -22,3 +24,5 @@ export declare enum CommandContractType { | ||
AaveBasicBuyCommandV2 = "AaveBasicBuyCommandV2", | ||
AaveBasicSellCommandV2 = "AaveBasicSellCommandV2" | ||
AaveBasicSellCommandV2 = "AaveBasicSellCommandV2", | ||
SparkStopLossCommandV2_2 = "SparkStopLossCommandV2_2", | ||
AaveStopLossCommandV2_2 = "AaveStopLossCommandV2_2" | ||
} | ||
@@ -46,3 +50,7 @@ export declare enum TriggerType { | ||
AaveBasicBuyV2 = 119, | ||
AaveBasicSellV2 = 120 | ||
AaveBasicSellV2 = 120, | ||
AaveStopLossToCollateralV2_2 = 121, | ||
AaveStopLossToDebtV2_2 = 122, | ||
SparkStopLossToCollateralV2_2 = 123, | ||
SparkStopLossToDebtV2_2 = 124 | ||
} | ||
@@ -49,0 +57,0 @@ export declare const triggerTypeToCommandContractTypeMap: Record<TriggerType, CommandContractType>; |
@@ -9,2 +9,4 @@ "use strict"; | ||
EthereumNetwork[EthereumNetwork["OPTIMISM"] = 10] = "OPTIMISM"; | ||
EthereumNetwork[EthereumNetwork["BASE"] = 8453] = "BASE"; | ||
EthereumNetwork[EthereumNetwork["ARBITRUM"] = 42161] = "ARBITRUM"; | ||
})(EthereumNetwork = exports.EthereumNetwork || (exports.EthereumNetwork = {})); | ||
@@ -27,2 +29,4 @@ var CommandContractType; | ||
CommandContractType["AaveBasicSellCommandV2"] = "AaveBasicSellCommandV2"; | ||
CommandContractType["SparkStopLossCommandV2_2"] = "SparkStopLossCommandV2_2"; | ||
CommandContractType["AaveStopLossCommandV2_2"] = "AaveStopLossCommandV2_2"; | ||
})(CommandContractType = exports.CommandContractType || (exports.CommandContractType = {})); | ||
@@ -52,2 +56,6 @@ var TriggerType; | ||
TriggerType[TriggerType["AaveBasicSellV2"] = 120] = "AaveBasicSellV2"; | ||
TriggerType[TriggerType["AaveStopLossToCollateralV2_2"] = 121] = "AaveStopLossToCollateralV2_2"; | ||
TriggerType[TriggerType["AaveStopLossToDebtV2_2"] = 122] = "AaveStopLossToDebtV2_2"; | ||
TriggerType[TriggerType["SparkStopLossToCollateralV2_2"] = 123] = "SparkStopLossToCollateralV2_2"; | ||
TriggerType[TriggerType["SparkStopLossToDebtV2_2"] = 124] = "SparkStopLossToDebtV2_2"; | ||
})(TriggerType = exports.TriggerType || (exports.TriggerType = {})); | ||
@@ -76,2 +84,6 @@ exports.triggerTypeToCommandContractTypeMap = { | ||
[TriggerType.AaveBasicSellV2]: CommandContractType.AaveBasicSellCommandV2, | ||
[TriggerType.AaveStopLossToCollateralV2_2]: CommandContractType.AaveStopLossCommandV2_2, | ||
[TriggerType.AaveStopLossToDebtV2_2]: CommandContractType.AaveStopLossCommandV2_2, | ||
[TriggerType.SparkStopLossToCollateralV2_2]: CommandContractType.SparkStopLossCommandV2_2, | ||
[TriggerType.SparkStopLossToDebtV2_2]: CommandContractType.SparkStopLossCommandV2_2, | ||
}; | ||
@@ -78,0 +90,0 @@ var TriggerGroupType; |
{ | ||
"name": "@oasisdex/automation", | ||
"packageManager": "yarn@1.22.21", | ||
"version": "1.5.9-alpha5", | ||
"version": "1.6.0-alpha.1", | ||
"description": "The set of utilities for Oasis automation", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/OasisDEX/common#readme", |
@@ -107,3 +107,3 @@ import { | ||
'collateralToken', | ||
'opHash', | ||
'opName', | ||
'execLtv', | ||
@@ -121,3 +121,3 @@ 'targetLtv', | ||
'collateralToken', | ||
'opHash', | ||
'opName', | ||
'execLtv', | ||
@@ -129,2 +129,20 @@ 'targetLtv', | ||
], | ||
[CommandContractType.AaveStopLossCommandV2_2]: [ | ||
'positionAddress', | ||
'triggerType', | ||
'maxCoverage', | ||
'debtToken', | ||
'collateralToken', | ||
'opName', | ||
'ltv', | ||
], | ||
[CommandContractType.SparkStopLossCommandV2_2]: [ | ||
'positionAddress', | ||
'triggerType', | ||
'maxCoverage', | ||
'debtToken', | ||
'collateralToken', | ||
'opName', | ||
'ltv', | ||
], | ||
}; | ||
@@ -210,2 +228,10 @@ | ||
}, | ||
[EthereumNetwork.BASE]: { | ||
'0xb7CB13e4cD2D64e739b5746563978Ab7ee36B064': { | ||
type: CommandContractType.AaveBasicBuyCommandV2, | ||
}, | ||
'0xbf566C1b260F0464f75470C146288283f11219a9': { | ||
type: CommandContractType.AaveBasicSellCommandV2, | ||
}, | ||
}, | ||
}).map(([network, mapping]) => [ | ||
@@ -294,3 +320,3 @@ network, | ||
'address', // collateralToken | ||
'bytes32', // opHash | ||
'bytes32', // opName | ||
'uint256', // execCollRatio | ||
@@ -308,3 +334,3 @@ 'uint256', // targetCollRatio | ||
'address', // collateralToken | ||
'bytes32', // opHash | ||
'bytes32', // opName | ||
'uint256', // execCollRatio | ||
@@ -316,2 +342,20 @@ 'uint256', // targetCollRatio | ||
], | ||
[CommandContractType.AaveStopLossCommandV2_2]: [ | ||
'address', //positionAddress | ||
'uint16', // triggerType | ||
'uint256', // maxCoverage | ||
'address', // debtToken | ||
'address', // collateralToken | ||
'bytes32', // opName | ||
'uint256', // executionLTV | ||
], | ||
[CommandContractType.SparkStopLossCommandV2_2]: [ | ||
'address', //positionAddress | ||
'uint16', // triggerType | ||
'uint256', // maxCoverage | ||
'address', // debtToken | ||
'address', // collateralToken | ||
'bytes32', // opName | ||
'uint256', // executionLTV | ||
], | ||
} as const; | ||
@@ -318,0 +362,0 @@ |
@@ -7,2 +7,4 @@ import { ethers } from 'ethers'; | ||
OPTIMISM = 10, | ||
BASE = 8453, | ||
ARBITRUM = 42161, | ||
} | ||
@@ -25,2 +27,4 @@ | ||
AaveBasicSellCommandV2 = 'AaveBasicSellCommandV2', | ||
SparkStopLossCommandV2_2 = 'SparkStopLossCommandV2_2', | ||
AaveStopLossCommandV2_2 = 'AaveStopLossCommandV2_2', | ||
} | ||
@@ -50,2 +54,6 @@ | ||
AaveBasicSellV2 = 120, | ||
AaveStopLossToCollateralV2_2 = 121, | ||
AaveStopLossToDebtV2_2 = 122, | ||
SparkStopLossToCollateralV2_2 = 123, | ||
SparkStopLossToDebtV2_2 = 124, | ||
} | ||
@@ -75,2 +83,6 @@ | ||
[TriggerType.AaveBasicSellV2]: CommandContractType.AaveBasicSellCommandV2, | ||
[TriggerType.AaveStopLossToCollateralV2_2]: CommandContractType.AaveStopLossCommandV2_2, | ||
[TriggerType.AaveStopLossToDebtV2_2]: CommandContractType.AaveStopLossCommandV2_2, | ||
[TriggerType.SparkStopLossToCollateralV2_2]: CommandContractType.SparkStopLossCommandV2_2, | ||
[TriggerType.SparkStopLossToDebtV2_2]: CommandContractType.SparkStopLossCommandV2_2, | ||
}; | ||
@@ -77,0 +89,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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
136487
1773
0