@defisaver/sdk 1.3.12 → 1.3.14-dev-morpho

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -422,9 +422,9 @@ export const actionAddresses = {
422
422
  FLAaveV3NoFee: '0x219ac6dA971dE6d943cffD1BD62abde71525d382',
423
423
  FLAaveV3: '0x53953aCEe438c083e4299F7976f03Ff3cb862161',
424
424
  FLBalancer: '0xdb28fE77709D88badC86868B27937428C3F48E73',
425
- FLUniV3: '0x9FD9884428615DF36c28B9ba206b67Ded81eB741',
426
- FLAction: '0x9FD9884428615DF36c28B9ba206b67Ded81eB741',
427
- FLMorphoBlue: '0x9FD9884428615DF36c28B9ba206b67Ded81eB741',
425
+ FLUniV3: '0xab4AA2fcEA33205b44a556f8C48ceC3f21aFf0C3',
426
+ FLAction: '0x5dB4459153d3037B9b8796F13bD4716569505B53',
427
+ FLMorphoBlue: '0x5dB4459153d3037B9b8796F13bD4716569505B53',
428
428
  GasFeeTakerL2: '0x2F64f73B222B4978CAfd0295c0fa106cE5f34996',
429
429
  AaveV3RatioCheck: '0x4a5c2cbCFB921b596Dec049389899CC8Eb4678ED',
430
430
  // uniswap V3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.3.12",
3
+ "version": "1.3.14-dev-morpho",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -0,0 +1,31 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ import { EthAddress, uint256, uint8 } from '../types';
4
+
5
+ /**
6
+ * Trigger contract that verifies if current token price ratio is outside of given range specified during subscription
7
+ * @category Triggers
8
+ */
9
+ export class MorphoBluePriceRangeTrigger extends Action {
10
+ /**
11
+ * @param loanToken - MarketParams loanToken
12
+ * @param collateralToken - MarketParams collateralToken
13
+ * @param oracle - MarketParams oracle
14
+ * @param lowerPrice - The lower price of the range
15
+ * @param upperPrice - The upper price of the range
16
+ */
17
+ constructor(
18
+ loanToken:EthAddress,
19
+ collateralToken:EthAddress,
20
+ oracle:EthAddress,
21
+ lowerPrice:uint256,
22
+ upperPrice:uint256,
23
+ ) {
24
+ super(
25
+ 'MorphoBluePriceRangeTrigger',
26
+ getAddr('Empty'),
27
+ [['address', 'address', 'address', 'uint256', 'uint256']],
28
+ [[oracle, collateralToken, loanToken, lowerPrice, upperPrice]],
29
+ );
30
+ }
31
+ }
@@ -0,0 +1,27 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ import { EthAddress, uint256 } from '../types';
4
+
5
+ /**
6
+ * SparkQuotePriceRangeTrigger
7
+ * @param baseTokenAddr - The address of the base token
8
+ * @param quoteTokenAddr - The address of the quote token
9
+ * @param lowerPrice - The lower price of the range
10
+ * @param upperPrice - The upper price of the range
11
+ * @category Triggers
12
+ */
13
+ export class SparkQuotePriceRangeTrigger extends Action {
14
+ constructor(
15
+ baseTokenAddr: EthAddress,
16
+ quoteTokenAddr: EthAddress,
17
+ lowerPrice: uint256,
18
+ upperPrice: uint256,
19
+ ) {
20
+ super(
21
+ 'SparkQuotePriceRangeTrigger',
22
+ getAddr('Empty'),
23
+ [['address', 'address', 'uint256', 'uint256']],
24
+ [[baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice]],
25
+ );
26
+ }
27
+ }
@@ -28,4 +28,6 @@ export * from './FluidRatioTrigger';
28
28
  export * from './CompV3PriceTrigger';
29
29
  export * from './CompV3PriceRangeTrigger';
30
30
  export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
- export * from './AaveV3QuotePriceRangeTrigger';
31
+ export * from './AaveV3QuotePriceRangeTrigger';
32
+ export * from './SparkQuotePriceRangeTrigger';
33
+ export * from './MorphoBluePriceRangeTrigger';
package/umd/index.js CHANGED
@@ -1735,10 +1735,10 @@ var actionAddresses = {
1735
1735
  FLAaveV3NoFee: '0x219ac6dA971dE6d943cffD1BD62abde71525d382',
1736
1736
  FLAaveV3: '0x53953aCEe438c083e4299F7976f03Ff3cb862161',
1737
1737
  FLBalancer: '0xdb28fE77709D88badC86868B27937428C3F48E73',
1738
- FLUniV3: '0x9FD9884428615DF36c28B9ba206b67Ded81eB741',
1738
+ FLUniV3: '0xab4AA2fcEA33205b44a556f8C48ceC3f21aFf0C3',
1739
1739
  // @DEV - incorrect, same as FLAction
1740
- FLAction: '0x9FD9884428615DF36c28B9ba206b67Ded81eB741',
1741
- FLMorphoBlue: '0x9FD9884428615DF36c28B9ba206b67Ded81eB741',
1740
+ FLAction: '0x5dB4459153d3037B9b8796F13bD4716569505B53',
1741
+ FLMorphoBlue: '0x5dB4459153d3037B9b8796F13bD4716569505B53',
1742
1742
  GasFeeTakerL2: '0x2F64f73B222B4978CAfd0295c0fa106cE5f34996',
1743
1743
  AaveV3RatioCheck: '0x4a5c2cbCFB921b596Dec049389899CC8Eb4678ED',
1744
1744
  // uniswap V3