@defisaver/sdk 1.3.14 → 1.3.15-unsub-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.
@@ -0,0 +1,11 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256 } from '../../types';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export declare class SummerfiUnsubAction extends Action {
7
+ /**
8
+ * @param cdpIds Array of CDP IDs to remove approval for
9
+ */
10
+ constructor(cdpIds: uint256[]);
11
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export class SummerfiUnsubAction extends Action {
7
+ /**
8
+ * @param cdpIds Array of CDP IDs to remove approval for
9
+ */
10
+ constructor(cdpIds) {
11
+ super('SummerfiUnsub', getAddr('SummerfiUnsub'), ['uint256[]'], [cdpIds]);
12
+ this.mappableArgs = [
13
+ this.args[0],
14
+ ];
15
+ }
16
+ }
@@ -0,0 +1,13 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256 } from '../../types';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export declare class SummerfiUnsubV2Action extends Action {
7
+ /**
8
+ * @param triggerIds Array of trigger ID arrays to remove
9
+ * @param triggerData Array of trigger data arrays (must match triggerIds length)
10
+ * @param removeAllowance Array of booleans indicating whether to remove allowance for each trigger group
11
+ */
12
+ constructor(triggerIds: uint256[][], triggerData: string[][], removeAllowance: boolean[]);
13
+ }
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export class SummerfiUnsubV2Action extends Action {
7
+ /**
8
+ * @param triggerIds Array of trigger ID arrays to remove
9
+ * @param triggerData Array of trigger data arrays (must match triggerIds length)
10
+ * @param removeAllowance Array of booleans indicating whether to remove allowance for each trigger group
11
+ */
12
+ constructor(triggerIds, triggerData, removeAllowance) {
13
+ super('SummerfiUnsubV2', getAddr('SummerfiUnsubV2'), ['uint256[][]', 'bytes[][]', 'bool[]'], [triggerIds, triggerData, removeAllowance]);
14
+ this.mappableArgs = [
15
+ this.args[0],
16
+ this.args[1],
17
+ this.args[2],
18
+ ];
19
+ }
20
+ }
@@ -1 +1,3 @@
1
1
  export * from './SFApproveTokensAction';
2
+ export * from './SummerfiUnsubAction';
3
+ export * from './SummerfiUnsubV2Action';
@@ -1 +1,3 @@
1
1
  export * from './SFApproveTokensAction';
2
+ export * from './SummerfiUnsubAction';
3
+ export * from './SummerfiUnsubV2Action';
@@ -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-unsub-dev",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -0,0 +1,25 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { uint256 } from '../../types';
4
+
5
+ /**
6
+ * @category Summerfi
7
+ */
8
+ export class SummerfiUnsubAction extends Action {
9
+ /**
10
+ * @param cdpIds Array of CDP IDs to remove approval for
11
+ */
12
+ constructor(
13
+ cdpIds: uint256[],
14
+ ) {
15
+ super(
16
+ 'SummerfiUnsub',
17
+ getAddr('SummerfiUnsub'),
18
+ ['uint256[]'],
19
+ [cdpIds],
20
+ );
21
+ this.mappableArgs = [
22
+ this.args[0],
23
+ ];
24
+ }
25
+ }
@@ -0,0 +1,31 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { uint256 } from '../../types';
4
+
5
+ /**
6
+ * @category Summerfi
7
+ */
8
+ export class SummerfiUnsubV2Action extends Action {
9
+ /**
10
+ * @param triggerIds Array of trigger ID arrays to remove
11
+ * @param triggerData Array of trigger data arrays (must match triggerIds length)
12
+ * @param removeAllowance Array of booleans indicating whether to remove allowance for each trigger group
13
+ */
14
+ constructor(
15
+ triggerIds: uint256[][],
16
+ triggerData: string[][],
17
+ removeAllowance: boolean[],
18
+ ) {
19
+ super(
20
+ 'SummerfiUnsubV2',
21
+ getAddr('SummerfiUnsubV2'),
22
+ ['uint256[][]', 'bytes[][]', 'bool[]'],
23
+ [triggerIds, triggerData, removeAllowance],
24
+ );
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ ];
30
+ }
31
+ }
@@ -1 +1,3 @@
1
1
  export * from './SFApproveTokensAction';
2
+ export * from './SummerfiUnsubAction';
3
+ export * from './SummerfiUnsubV2Action';
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';