@defisaver/sdk 1.3.14 → 1.3.15-dev-dev

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.
@@ -131,7 +131,7 @@ export const actionAddresses = {
131
131
  FLMaker: '0x0f8C3368cADF78167F5355D746Ed7b2A826A6e3b',
132
132
  FLBalancer: '0x93d333930c7f7260a1E6061B0a8C0CbdEC95F367',
133
133
  FLSpark: '0xe9Fe5a0f5e4B370Ae60d837da58744666D5C06F7',
134
- FLAction: '0x7A0f3963c666d4549e5909a7162B560abF9f006D',
134
+ FLAction: '0x8d9cda62dc7bf75f687c6c8729abb51ac82e20d5',
135
135
  FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
136
136
  FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
137
137
  FLMorphoBlue: '0x6206C96EAc5EAC546861438A9f953B6BEa50EBAB',
@@ -636,7 +636,7 @@ export const actionAddresses = {
636
636
  };
637
637
  export const otherAddresses = {
638
638
  [NETWORKS.ethereum.chainId]: {
639
- RecipeExecutor: '0x4677c84699ab29637102609cD2868d0743a48DdF',
639
+ RecipeExecutor: '0x10b748dc504c2515bb6a9e23cb2f686090b6c584',
640
640
  RecipeExecutorForTxSaver: '0x2ee96cf53ae5fbd5309284704f978d0ca66cb963',
641
641
  DFSRegistry: '0x287778F121F134C66212FB16c9b53eC991D32f5b',
642
642
  DFSProxyRegistry: '0x29474FdaC7142f9aB7773B8e38264FA15E3805ed',
@@ -0,0 +1,16 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, uint256 } from '../types';
3
+ /**
4
+ * Trigger contract that verifies if current token price ratio is outside of given range specified during subscription
5
+ * @category Triggers
6
+ */
7
+ export declare class MorphoBluePriceRangeTrigger extends Action {
8
+ /**
9
+ * @param loanToken - MarketParams loanToken
10
+ * @param collateralToken - MarketParams collateralToken
11
+ * @param oracle - MarketParams oracle
12
+ * @param lowerPrice - The lower price of the range
13
+ * @param upperPrice - The upper price of the range
14
+ */
15
+ constructor(loanToken: EthAddress, collateralToken: EthAddress, oracle: EthAddress, lowerPrice: uint256, upperPrice: uint256);
16
+ }
@@ -0,0 +1,18 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ * Trigger contract that verifies if current token price ratio is outside of given range specified during subscription
5
+ * @category Triggers
6
+ */
7
+ export class MorphoBluePriceRangeTrigger extends Action {
8
+ /**
9
+ * @param loanToken - MarketParams loanToken
10
+ * @param collateralToken - MarketParams collateralToken
11
+ * @param oracle - MarketParams oracle
12
+ * @param lowerPrice - The lower price of the range
13
+ * @param upperPrice - The upper price of the range
14
+ */
15
+ constructor(loanToken, collateralToken, oracle, lowerPrice, upperPrice) {
16
+ super('MorphoBluePriceRangeTrigger', getAddr('Empty'), [['address', 'address', 'address', 'uint256', 'uint256']], [[oracle, collateralToken, loanToken, lowerPrice, upperPrice]]);
17
+ }
18
+ }
@@ -30,3 +30,4 @@ export * from './CompV3PriceRangeTrigger';
30
30
  export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
31
  export * from './AaveV3QuotePriceRangeTrigger';
32
32
  export * from './SparkQuotePriceRangeTrigger';
33
+ export * from './MorphoBluePriceRangeTrigger';
@@ -30,3 +30,4 @@ export * from './CompV3PriceRangeTrigger';
30
30
  export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
31
  export * from './AaveV3QuotePriceRangeTrigger';
32
32
  export * from './SparkQuotePriceRangeTrigger';
33
+ export * from './MorphoBluePriceRangeTrigger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.3.14",
3
+ "version": "1.3.15-dev-dev",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
package/src/addresses.ts CHANGED
@@ -144,7 +144,7 @@ export const actionAddresses = {
144
144
  FLMaker: '0x0f8C3368cADF78167F5355D746Ed7b2A826A6e3b',
145
145
  FLBalancer: '0x93d333930c7f7260a1E6061B0a8C0CbdEC95F367',
146
146
  FLSpark: '0xe9Fe5a0f5e4B370Ae60d837da58744666D5C06F7',
147
- FLAction: '0x7A0f3963c666d4549e5909a7162B560abF9f006D',
147
+ FLAction: '0x8d9cda62dc7bf75f687c6c8729abb51ac82e20d5',
148
148
  FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
149
149
  FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
150
150
  FLMorphoBlue: '0x6206C96EAc5EAC546861438A9f953B6BEa50EBAB',
@@ -714,7 +714,7 @@ export const actionAddresses = {
714
714
 
715
715
  export const otherAddresses = {
716
716
  [NETWORKS.ethereum.chainId]: {
717
- RecipeExecutor: '0x4677c84699ab29637102609cD2868d0743a48DdF',
717
+ RecipeExecutor: '0x10b748dc504c2515bb6a9e23cb2f686090b6c584',
718
718
  RecipeExecutorForTxSaver: '0x2ee96cf53ae5fbd5309284704f978d0ca66cb963',
719
719
  DFSRegistry: '0x287778F121F134C66212FB16c9b53eC991D32f5b',
720
720
  DFSProxyRegistry: '0x29474FdaC7142f9aB7773B8e38264FA15E3805ed',
@@ -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
+ }
@@ -29,4 +29,5 @@ export * from './CompV3PriceTrigger';
29
29
  export * from './CompV3PriceRangeTrigger';
30
30
  export * from './LiquityV2AdjustRateDebtInFrontTrigger';
31
31
  export * from './AaveV3QuotePriceRangeTrigger';
32
- export * from './SparkQuotePriceRangeTrigger';
32
+ export * from './SparkQuotePriceRangeTrigger';
33
+ export * from './MorphoBluePriceRangeTrigger';
package/umd/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  exports["defisaver-sdk"] = factory(require("web3-eth-abi"), require("web3-utils"), require("decimal.js"), require("@defisaver/tokens"), require("@ethersproject/solidity"), require("@ethersproject/address"), require("axios"));
8
8
  else
9
9
  root["defisaver-sdk"] = factory(root["web3-eth-abi"], root["web3-utils"], root["decimal.js"], root["@defisaver/tokens"], root["@ethersproject/solidity"], root["@ethersproject/address"], root["axios"]);
10
- })(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__138__, __WEBPACK_EXTERNAL_MODULE__139__, __WEBPACK_EXTERNAL_MODULE__443__) => {
10
+ })(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__138__, __WEBPACK_EXTERNAL_MODULE__139__, __WEBPACK_EXTERNAL_MODULE__444__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ([
@@ -1444,7 +1444,7 @@ var actionAddresses = {
1444
1444
  FLMaker: '0x0f8C3368cADF78167F5355D746Ed7b2A826A6e3b',
1445
1445
  FLBalancer: '0x93d333930c7f7260a1E6061B0a8C0CbdEC95F367',
1446
1446
  FLSpark: '0xe9Fe5a0f5e4B370Ae60d837da58744666D5C06F7',
1447
- FLAction: '0x7A0f3963c666d4549e5909a7162B560abF9f006D',
1447
+ FLAction: '0x8d9cda62dc7bf75f687c6c8729abb51ac82e20d5',
1448
1448
  FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
1449
1449
  FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
1450
1450
  FLMorphoBlue: '0x6206C96EAc5EAC546861438A9f953B6BEa50EBAB',
@@ -1953,7 +1953,7 @@ var actionAddresses = {
1953
1953
  };
1954
1954
  var otherAddresses = {
1955
1955
  [_config__WEBPACK_IMPORTED_MODULE_0__.NETWORKS.ethereum.chainId]: {
1956
- RecipeExecutor: '0x4677c84699ab29637102609cD2868d0743a48DdF',
1956
+ RecipeExecutor: '0x10b748dc504c2515bb6a9e23cb2f686090b6c584',
1957
1957
  RecipeExecutorForTxSaver: '0x2ee96cf53ae5fbd5309284704f978d0ca66cb963',
1958
1958
  DFSRegistry: '0x287778F121F134C66212FB16c9b53eC991D32f5b',
1959
1959
  DFSProxyRegistry: '0x29474FdaC7142f9aB7773B8e38264FA15E3805ed',
@@ -16398,6 +16398,7 @@ __webpack_require__.r(__webpack_exports__);
16398
16398
  /* harmony export */ LiquityV2RatioTrigger: () => (/* reexport safe */ _LiquityV2RatioTrigger__WEBPACK_IMPORTED_MODULE_23__.LiquityV2RatioTrigger),
16399
16399
  /* harmony export */ MakerRatioTrigger: () => (/* reexport safe */ _MakerRatioTrigger__WEBPACK_IMPORTED_MODULE_0__.MakerRatioTrigger),
16400
16400
  /* harmony export */ MorphoAaveV2RatioTrigger: () => (/* reexport safe */ _MorphoAaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_14__.MorphoAaveV2RatioTrigger),
16401
+ /* harmony export */ MorphoBluePriceRangeTrigger: () => (/* reexport safe */ _MorphoBluePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_32__.MorphoBluePriceRangeTrigger),
16401
16402
  /* harmony export */ MorphoBluePriceTrigger: () => (/* reexport safe */ _MorphoBluePriceTrigger__WEBPACK_IMPORTED_MODULE_22__.MorphoBluePriceTrigger),
16402
16403
  /* harmony export */ MorphoBlueRatioTrigger: () => (/* reexport safe */ _MorphoBlueRatioTrigger__WEBPACK_IMPORTED_MODULE_20__.MorphoBlueRatioTrigger),
16403
16404
  /* harmony export */ OffchainPriceTrigger: () => (/* reexport safe */ _OffchainPriceTrigger__WEBPACK_IMPORTED_MODULE_21__.OffchainPriceTrigger),
@@ -16441,6 +16442,8 @@ __webpack_require__.r(__webpack_exports__);
16441
16442
  /* harmony import */ var _LiquityV2AdjustRateDebtInFrontTrigger__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(438);
16442
16443
  /* harmony import */ var _AaveV3QuotePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(439);
16443
16444
  /* harmony import */ var _SparkQuotePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(440);
16445
+ /* harmony import */ var _MorphoBluePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(441);
16446
+
16444
16447
 
16445
16448
 
16446
16449
 
@@ -17220,6 +17223,35 @@ class SparkQuotePriceRangeTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.A
17220
17223
  /* 441 */
17221
17224
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17222
17225
 
17226
+ __webpack_require__.r(__webpack_exports__);
17227
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17228
+ /* harmony export */ MorphoBluePriceRangeTrigger: () => (/* binding */ MorphoBluePriceRangeTrigger)
17229
+ /* harmony export */ });
17230
+ /* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
17231
+ /* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
17232
+
17233
+
17234
+ /**
17235
+ * Trigger contract that verifies if current token price ratio is outside of given range specified during subscription
17236
+ * @category Triggers
17237
+ */
17238
+ class MorphoBluePriceRangeTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
17239
+ /**
17240
+ * @param loanToken - MarketParams loanToken
17241
+ * @param collateralToken - MarketParams collateralToken
17242
+ * @param oracle - MarketParams oracle
17243
+ * @param lowerPrice - The lower price of the range
17244
+ * @param upperPrice - The upper price of the range
17245
+ */
17246
+ constructor(loanToken, collateralToken, oracle, lowerPrice, upperPrice) {
17247
+ super('MorphoBluePriceRangeTrigger', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), [['address', 'address', 'address', 'uint256', 'uint256']], [[oracle, collateralToken, loanToken, lowerPrice, upperPrice]]);
17248
+ }
17249
+ }
17250
+
17251
+ /***/ }),
17252
+ /* 442 */
17253
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17254
+
17223
17255
  __webpack_require__.r(__webpack_exports__);
17224
17256
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17225
17257
  /* harmony export */ basicUtils: () => (/* reexport module object */ _basic_utils__WEBPACK_IMPORTED_MODULE_7__),
@@ -17231,9 +17263,9 @@ __webpack_require__.r(__webpack_exports__);
17231
17263
  /* harmony export */ uniswapV3LP: () => (/* reexport module object */ _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__),
17232
17264
  /* harmony export */ zeroExExchange: () => (/* reexport module object */ _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__)
17233
17265
  /* harmony export */ });
17234
- /* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(442);
17266
+ /* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(443);
17235
17267
  /* harmony import */ var _uniswapLP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(137);
17236
- /* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(444);
17268
+ /* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(445);
17237
17269
  /* harmony import */ var _convex_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(243);
17238
17270
  /* harmony import */ var _mstableAssetPairs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
17239
17271
  /* harmony import */ var _curve_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(209);
@@ -17250,7 +17282,7 @@ __webpack_require__.r(__webpack_exports__);
17250
17282
 
17251
17283
 
17252
17284
  /***/ }),
17253
- /* 442 */
17285
+ /* 443 */
17254
17286
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17255
17287
 
17256
17288
  __webpack_require__.r(__webpack_exports__);
@@ -17261,7 +17293,7 @@ __webpack_require__.r(__webpack_exports__);
17261
17293
  /* harmony export */ });
17262
17294
  /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
17263
17295
  /* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(decimal_js__WEBPACK_IMPORTED_MODULE_0__);
17264
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(443);
17296
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(444);
17265
17297
  /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
17266
17298
  /* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
17267
17299
  /* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__);
@@ -17463,20 +17495,20 @@ var createSellAction = /*#__PURE__*/function () {
17463
17495
  }();
17464
17496
 
17465
17497
  /***/ }),
17466
- /* 443 */
17498
+ /* 444 */
17467
17499
  /***/ ((module) => {
17468
17500
 
17469
- module.exports = __WEBPACK_EXTERNAL_MODULE__443__;
17501
+ module.exports = __WEBPACK_EXTERNAL_MODULE__444__;
17470
17502
 
17471
17503
  /***/ }),
17472
- /* 444 */
17504
+ /* 445 */
17473
17505
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17474
17506
 
17475
17507
  __webpack_require__.r(__webpack_exports__);
17476
17508
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17477
17509
  /* harmony export */ getAssetAddrByTokenId: () => (/* binding */ getAssetAddrByTokenId)
17478
17510
  /* harmony export */ });
17479
- /* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(445);
17511
+ /* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(446);
17480
17512
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
17481
17513
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
17482
17514
  /**
@@ -17501,7 +17533,7 @@ var getAssetAddrByTokenId = /*#__PURE__*/function () {
17501
17533
  }();
17502
17534
 
17503
17535
  /***/ }),
17504
- /* 445 */
17536
+ /* 446 */
17505
17537
  /***/ ((module) => {
17506
17538
 
17507
17539
  module.exports = /*#__PURE__*/JSON.parse('[{"constant":false,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"positions","outputs":[{"name":"nonce","type":"uint96"},{"name":"operator","type":"address"},{"name":"token0","type":"address"},{"name":"token1","type":"address"},{"name":"fee","type":"uint24"},{"name":"tickLower","type":"int24"},{"name":"tickUpper","type":"int24"},{"name":"liquidity","type":"uint128"},{"name":"feeGrowthInside0LastX128","type":"uint256"},{"name":"feeGrowthInside1LastX128","type":"uint256"},{"name":"tokensOwed0","type":"uint128"},{"name":"tokensOwed1","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"}]');
@@ -17606,7 +17638,7 @@ __webpack_require__.r(__webpack_exports__);
17606
17638
  /* harmony import */ var _DfsWeb3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30);
17607
17639
  /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
17608
17640
  /* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(408);
17609
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(441);
17641
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(442);
17610
17642
  /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4);
17611
17643
  /* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
17612
17644
  /* Export types here */