@defisaver/sdk 1.0.66-dev-1 → 1.0.66-dev-2

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.
@@ -8,8 +8,9 @@ import { uint256 } from '../../types';
8
8
  export declare class WrapEthAction extends ActionWithL2 {
9
9
  /**
10
10
  * @param amount Wrap amount
11
+ * @param includeEthInTx If true, the transaction will include the ETH value in the transaction
11
12
  */
12
- constructor(amount: uint256);
13
+ constructor(amount: uint256, includeEthInTx?: boolean);
13
14
  getEthValue(): Promise<any>;
14
15
  encodeInputs(): string;
15
16
  }
@@ -17,13 +17,14 @@ import { getAddr } from '../../addresses';
17
17
  export class WrapEthAction extends ActionWithL2 {
18
18
  /**
19
19
  * @param amount Wrap amount
20
+ * @param includeEthInTx If true, the transaction will include the ETH value in the transaction
20
21
  */
21
- constructor(amount) {
22
- super('WrapEth', getAddr('WrapEth'), ['uint256'], [amount]);
22
+ constructor(amount, includeEthInTx = true) {
23
+ super('WrapEth', getAddr('WrapEth'), ['uint256', 'bool'], [amount, includeEthInTx]);
23
24
  }
24
25
  getEthValue() {
25
26
  return __awaiter(this, void 0, void 0, function* () {
26
- return this.args[0];
27
+ return this.args[1] ? this.args[0] : 0;
27
28
  });
28
29
  }
29
30
  encodeInputs() {
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { uint8, uint256, EthAddress } from '../../types';
3
+ /**
4
+ * MorphoBlueRatioCheckAction - Checks MorphoBlue ratio for user position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export declare class MorphoBlueRatioCheckAction extends Action {
9
+ /**
10
+ * @param loanToken - MarketParams loanToken
11
+ * @param collateralToken - MarketParams collateralToken
12
+ * @param oracle - MarketParams oracle
13
+ * @param irm - MarketParams irm
14
+ * @param lltv - MarketParams lltv
15
+ * @param user Address of the user we are checking the ratio for
16
+ * @param ratioState If it should lower/higher
17
+ * @param targetRatio The ratio user want to be at
18
+ */
19
+ constructor(loanToken: EthAddress, collateralToken: EthAddress, oracle: EthAddress, irm: EthAddress, lltv: uint256, user: EthAddress, ratioState: uint8, targetRatio: uint256);
20
+ }
@@ -0,0 +1,32 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * MorphoBlueRatioCheckAction - Checks MorphoBlue ratio for user position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export class MorphoBlueRatioCheckAction extends Action {
9
+ /**
10
+ * @param loanToken - MarketParams loanToken
11
+ * @param collateralToken - MarketParams collateralToken
12
+ * @param oracle - MarketParams oracle
13
+ * @param irm - MarketParams irm
14
+ * @param lltv - MarketParams lltv
15
+ * @param user Address of the user we are checking the ratio for
16
+ * @param ratioState If it should lower/higher
17
+ * @param targetRatio The ratio user want to be at
18
+ */
19
+ constructor(loanToken, collateralToken, oracle, irm, lltv, user, ratioState, targetRatio) {
20
+ super('MorphoBlueRatioCheck', getAddr('MorphoBlueRatioCheck'), [['address', 'address', 'address', 'address', 'uint256'], 'address', 'uint8', 'uint256'], [[loanToken, collateralToken, oracle, irm, lltv], user, ratioState, targetRatio]);
21
+ this.mappableArgs = [
22
+ this.args[0][0],
23
+ this.args[0][1],
24
+ this.args[0][2],
25
+ this.args[0][3],
26
+ this.args[0][4],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ ];
31
+ }
32
+ }
@@ -8,3 +8,4 @@ export * from './MorphoAaveV2RatioCheckAction';
8
8
  export * from './SparkRatioCheckAction';
9
9
  export * from './LiquityRatioIncreaseCheckAction';
10
10
  export * from './CurveUsdCollRatioCheck';
11
+ export * from './MorphoBlueRatioCheckAction';
@@ -8,3 +8,4 @@ export * from './MorphoAaveV2RatioCheckAction';
8
8
  export * from './SparkRatioCheckAction';
9
9
  export * from './LiquityRatioIncreaseCheckAction';
10
10
  export * from './CurveUsdCollRatioCheck';
11
+ export * from './MorphoBlueRatioCheckAction';
@@ -206,6 +206,7 @@ export declare const actionAddresses: {
206
206
  ToggleSub: string;
207
207
  TokenBalance: string;
208
208
  TokenizedVaultAdapter: string;
209
+ ChangeProxyOwner: string;
209
210
  AaveV3ATokenPayback: string;
210
211
  AaveV3Borrow: string;
211
212
  AaveV3CollateralSwitch: string;
@@ -230,7 +231,6 @@ export declare const actionAddresses: {
230
231
  UniCreatePoolV3: string;
231
232
  SumInputs?: undefined;
232
233
  SubInputs?: undefined;
233
- ChangeProxyOwner?: undefined;
234
234
  AutomationV2Unsub?: undefined;
235
235
  UpdateSub?: undefined;
236
236
  TransferNFT?: undefined;
@@ -400,6 +400,7 @@ export declare const actionAddresses: {
400
400
  ToggleSub: string;
401
401
  TokenBalance: string;
402
402
  TokenizedVaultAdapter: string;
403
+ ChangeProxyOwner: string;
403
404
  AaveV3ATokenPayback: string;
404
405
  AaveV3Borrow: string;
405
406
  AaveV3CollateralSwitch: string;
@@ -428,7 +429,6 @@ export declare const actionAddresses: {
428
429
  UniCreatePoolV3: string;
429
430
  SumInputs?: undefined;
430
431
  SubInputs?: undefined;
431
- ChangeProxyOwner?: undefined;
432
432
  AutomationV2Unsub?: undefined;
433
433
  UpdateSub?: undefined;
434
434
  TransferNFT?: undefined;
@@ -592,6 +592,7 @@ export declare const actionAddresses: {
592
592
  SendToken: string;
593
593
  PullToken: string;
594
594
  TokenBalance: string;
595
+ ChangeProxyOwner: string;
595
596
  FLAaveV3: string;
596
597
  FLBalancer: string;
597
598
  FLUniV3: string;
@@ -614,7 +615,6 @@ export declare const actionAddresses: {
614
615
  CompV3Withdraw: string;
615
616
  SumInputs?: undefined;
616
617
  SubInputs?: undefined;
617
- ChangeProxyOwner?: undefined;
618
618
  AutomationV2Unsub?: undefined;
619
619
  SendTokenAndUnwrap?: undefined;
620
620
  ToggleSub?: undefined;
@@ -234,6 +234,7 @@ export const actionAddresses = {
234
234
  ToggleSub: '0x988C5C24AE6348404196267e19962f36961CAc29',
235
235
  TokenBalance: '0xC6FF5b01f7c7b35b6e093fF70D2332B361C5Be5A',
236
236
  TokenizedVaultAdapter: '0xdf31669FEd440f5BfF658ca0bBF0D22B8abdeb73',
237
+ ChangeProxyOwner: '0x62769258ea8b3a85cc6fb4332fc2760a122dbc9e',
237
238
  // aave v3
238
239
  AaveV3ATokenPayback: '0x71B27114D1777298bD46c3770C42F9f807C49847',
239
240
  AaveV3Borrow: '0x8CaDc8A911D19B9e4D36c9bAdE47d970f362BcEa',
@@ -271,6 +272,7 @@ export const actionAddresses = {
271
272
  ToggleSub: '0x71015226EADFd4aC887fB56556F64338e352439b',
272
273
  TokenBalance: '0x483B903E702F60698Dd8124558C6199922737f1F',
273
274
  TokenizedVaultAdapter: '0xD05C512bDFf6D3eAc5328807B3bC075F35271167',
275
+ ChangeProxyOwner: '0x29F66A5fcB601c806E7156f29FDEC771BdC9c08d',
274
276
  // aave v3
275
277
  AaveV3ATokenPayback: '0x261906e5E0D0D38D9cBb5c10dB9c4031aabdf8C1',
276
278
  AaveV3Borrow: '0x5786809DA660dB613994460F096F19fcd19eD4c9',
@@ -310,6 +312,7 @@ export const actionAddresses = {
310
312
  SendToken: '0x1420f4977E7B71AFddccBFc6F6e1505CefdF99F0',
311
313
  PullToken: '0x5B0B7E38C2a8e46CfAe13c360BC5927570BeEe94',
312
314
  TokenBalance: '0xc44bcE580B1b3339fE9272D3bC3d6566083ea59C',
315
+ ChangeProxyOwner: '0x1947a44d3717a47556175d64fdc208619aa08874',
313
316
  // Flashloan
314
317
  FLAaveV3: '0x79Eb9cEe432Cd3e7b09A9eFdB21A733A6d7b4c3A',
315
318
  FLBalancer: '0x862E533198C9656B75bB6A5dDF0953F7ED5E8507',
@@ -217,6 +217,7 @@ declare const actionAddressesAllChains: {
217
217
  ToggleSub: string;
218
218
  TokenBalance: string;
219
219
  TokenizedVaultAdapter: string;
220
+ ChangeProxyOwner: string;
220
221
  AaveV3ATokenPayback: string;
221
222
  AaveV3Borrow: string;
222
223
  AaveV3CollateralSwitch: string;
@@ -241,7 +242,6 @@ declare const actionAddressesAllChains: {
241
242
  UniCreatePoolV3: string;
242
243
  SumInputs?: undefined;
243
244
  SubInputs?: undefined;
244
- ChangeProxyOwner?: undefined;
245
245
  AutomationV2Unsub?: undefined;
246
246
  UpdateSub?: undefined;
247
247
  TransferNFT?: undefined;
@@ -411,6 +411,7 @@ declare const actionAddressesAllChains: {
411
411
  ToggleSub: string;
412
412
  TokenBalance: string;
413
413
  TokenizedVaultAdapter: string;
414
+ ChangeProxyOwner: string;
414
415
  AaveV3ATokenPayback: string;
415
416
  AaveV3Borrow: string;
416
417
  AaveV3CollateralSwitch: string;
@@ -439,7 +440,6 @@ declare const actionAddressesAllChains: {
439
440
  UniCreatePoolV3: string;
440
441
  SumInputs?: undefined;
441
442
  SubInputs?: undefined;
442
- ChangeProxyOwner?: undefined;
443
443
  AutomationV2Unsub?: undefined;
444
444
  UpdateSub?: undefined;
445
445
  TransferNFT?: undefined;
@@ -603,6 +603,7 @@ declare const actionAddressesAllChains: {
603
603
  SendToken: string;
604
604
  PullToken: string;
605
605
  TokenBalance: string;
606
+ ChangeProxyOwner: string;
606
607
  FLAaveV3: string;
607
608
  FLBalancer: string;
608
609
  FLUniV3: string;
@@ -625,7 +626,6 @@ declare const actionAddressesAllChains: {
625
626
  CompV3Withdraw: string;
626
627
  SumInputs?: undefined;
627
628
  SubInputs?: undefined;
628
- ChangeProxyOwner?: undefined;
629
629
  AutomationV2Unsub?: undefined;
630
630
  SendTokenAndUnwrap?: undefined;
631
631
  ToggleSub?: undefined;
@@ -999,6 +999,7 @@ declare const actionAddresses: (chainId?: null) => {
999
999
  ToggleSub: string;
1000
1000
  TokenBalance: string;
1001
1001
  TokenizedVaultAdapter: string;
1002
+ ChangeProxyOwner: string;
1002
1003
  AaveV3ATokenPayback: string;
1003
1004
  AaveV3Borrow: string;
1004
1005
  AaveV3CollateralSwitch: string;
@@ -1023,7 +1024,6 @@ declare const actionAddresses: (chainId?: null) => {
1023
1024
  UniCreatePoolV3: string;
1024
1025
  SumInputs?: undefined;
1025
1026
  SubInputs?: undefined;
1026
- ChangeProxyOwner?: undefined;
1027
1027
  AutomationV2Unsub?: undefined;
1028
1028
  UpdateSub?: undefined;
1029
1029
  TransferNFT?: undefined;
@@ -1193,6 +1193,7 @@ declare const actionAddresses: (chainId?: null) => {
1193
1193
  ToggleSub: string;
1194
1194
  TokenBalance: string;
1195
1195
  TokenizedVaultAdapter: string;
1196
+ ChangeProxyOwner: string;
1196
1197
  AaveV3ATokenPayback: string;
1197
1198
  AaveV3Borrow: string;
1198
1199
  AaveV3CollateralSwitch: string;
@@ -1221,7 +1222,6 @@ declare const actionAddresses: (chainId?: null) => {
1221
1222
  UniCreatePoolV3: string;
1222
1223
  SumInputs?: undefined;
1223
1224
  SubInputs?: undefined;
1224
- ChangeProxyOwner?: undefined;
1225
1225
  AutomationV2Unsub?: undefined;
1226
1226
  UpdateSub?: undefined;
1227
1227
  TransferNFT?: undefined;
@@ -1385,6 +1385,7 @@ declare const actionAddresses: (chainId?: null) => {
1385
1385
  SendToken: string;
1386
1386
  PullToken: string;
1387
1387
  TokenBalance: string;
1388
+ ChangeProxyOwner: string;
1388
1389
  FLAaveV3: string;
1389
1390
  FLBalancer: string;
1390
1391
  FLUniV3: string;
@@ -1407,7 +1408,6 @@ declare const actionAddresses: (chainId?: null) => {
1407
1408
  CompV3Withdraw: string;
1408
1409
  SumInputs?: undefined;
1409
1410
  SubInputs?: undefined;
1410
- ChangeProxyOwner?: undefined;
1411
1411
  AutomationV2Unsub?: undefined;
1412
1412
  SendTokenAndUnwrap?: undefined;
1413
1413
  ToggleSub?: undefined;
@@ -1924,6 +1924,7 @@ declare const _default: {
1924
1924
  ToggleSub: string;
1925
1925
  TokenBalance: string;
1926
1926
  TokenizedVaultAdapter: string;
1927
+ ChangeProxyOwner: string;
1927
1928
  AaveV3ATokenPayback: string;
1928
1929
  AaveV3Borrow: string;
1929
1930
  AaveV3CollateralSwitch: string;
@@ -1948,7 +1949,6 @@ declare const _default: {
1948
1949
  UniCreatePoolV3: string;
1949
1950
  SumInputs?: undefined;
1950
1951
  SubInputs?: undefined;
1951
- ChangeProxyOwner?: undefined;
1952
1952
  AutomationV2Unsub?: undefined;
1953
1953
  UpdateSub?: undefined;
1954
1954
  TransferNFT?: undefined;
@@ -2118,6 +2118,7 @@ declare const _default: {
2118
2118
  ToggleSub: string;
2119
2119
  TokenBalance: string;
2120
2120
  TokenizedVaultAdapter: string;
2121
+ ChangeProxyOwner: string;
2121
2122
  AaveV3ATokenPayback: string;
2122
2123
  AaveV3Borrow: string;
2123
2124
  AaveV3CollateralSwitch: string;
@@ -2146,7 +2147,6 @@ declare const _default: {
2146
2147
  UniCreatePoolV3: string;
2147
2148
  SumInputs?: undefined;
2148
2149
  SubInputs?: undefined;
2149
- ChangeProxyOwner?: undefined;
2150
2150
  AutomationV2Unsub?: undefined;
2151
2151
  UpdateSub?: undefined;
2152
2152
  TransferNFT?: undefined;
@@ -2310,6 +2310,7 @@ declare const _default: {
2310
2310
  SendToken: string;
2311
2311
  PullToken: string;
2312
2312
  TokenBalance: string;
2313
+ ChangeProxyOwner: string;
2313
2314
  FLAaveV3: string;
2314
2315
  FLBalancer: string;
2315
2316
  FLUniV3: string;
@@ -2332,7 +2333,6 @@ declare const _default: {
2332
2333
  CompV3Withdraw: string;
2333
2334
  SumInputs?: undefined;
2334
2335
  SubInputs?: undefined;
2335
- ChangeProxyOwner?: undefined;
2336
2336
  AutomationV2Unsub?: undefined;
2337
2337
  SendTokenAndUnwrap?: undefined;
2338
2338
  ToggleSub?: undefined;
@@ -2706,6 +2706,7 @@ declare const _default: {
2706
2706
  ToggleSub: string;
2707
2707
  TokenBalance: string;
2708
2708
  TokenizedVaultAdapter: string;
2709
+ ChangeProxyOwner: string;
2709
2710
  AaveV3ATokenPayback: string;
2710
2711
  AaveV3Borrow: string;
2711
2712
  AaveV3CollateralSwitch: string;
@@ -2730,7 +2731,6 @@ declare const _default: {
2730
2731
  UniCreatePoolV3: string;
2731
2732
  SumInputs?: undefined;
2732
2733
  SubInputs?: undefined;
2733
- ChangeProxyOwner?: undefined;
2734
2734
  AutomationV2Unsub?: undefined;
2735
2735
  UpdateSub?: undefined;
2736
2736
  TransferNFT?: undefined;
@@ -2900,6 +2900,7 @@ declare const _default: {
2900
2900
  ToggleSub: string;
2901
2901
  TokenBalance: string;
2902
2902
  TokenizedVaultAdapter: string;
2903
+ ChangeProxyOwner: string;
2903
2904
  AaveV3ATokenPayback: string;
2904
2905
  AaveV3Borrow: string;
2905
2906
  AaveV3CollateralSwitch: string;
@@ -2928,7 +2929,6 @@ declare const _default: {
2928
2929
  UniCreatePoolV3: string;
2929
2930
  SumInputs?: undefined;
2930
2931
  SubInputs?: undefined;
2931
- ChangeProxyOwner?: undefined;
2932
2932
  AutomationV2Unsub?: undefined;
2933
2933
  UpdateSub?: undefined;
2934
2934
  TransferNFT?: undefined;
@@ -3092,6 +3092,7 @@ declare const _default: {
3092
3092
  SendToken: string;
3093
3093
  PullToken: string;
3094
3094
  TokenBalance: string;
3095
+ ChangeProxyOwner: string;
3095
3096
  FLAaveV3: string;
3096
3097
  FLBalancer: string;
3097
3098
  FLUniV3: string;
@@ -3114,7 +3115,6 @@ declare const _default: {
3114
3115
  CompV3Withdraw: string;
3115
3116
  SumInputs?: undefined;
3116
3117
  SubInputs?: undefined;
3117
- ChangeProxyOwner?: undefined;
3118
3118
  AutomationV2Unsub?: undefined;
3119
3119
  SendTokenAndUnwrap?: undefined;
3120
3120
  ToggleSub?: undefined;
@@ -0,0 +1,10 @@
1
+ import { Action } from '../Action';
2
+ import { EthAddress, bytes32, uint256, uint8 } from '../types';
3
+ /**
4
+ *
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export declare class MorphoBlueRatioTrigger extends Action {
9
+ constructor(marketId: bytes32, user: EthAddress, ratio: uint256, state: uint8);
10
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from '../Action';
2
+ import { getAddr } from '../addresses';
3
+ /**
4
+ *
5
+ *
6
+ * @category Triggers
7
+ */
8
+ export class MorphoBlueRatioTrigger extends Action {
9
+ constructor(marketId, user, ratio, state) {
10
+ super('MorphoBlueRatioTrigger', getAddr('MorphoBlueRatioTrigger'), [['bytes32', 'address', 'uint256', 'uint8']], [[marketId, user, ratio, state]]);
11
+ }
12
+ }
@@ -17,4 +17,5 @@ export * from './SparkRatioTrigger';
17
17
  export * from './SparkQuotePriceTrigger';
18
18
  export * from './LiquityDebtInFrontWithLimitTrigger';
19
19
  export * from './CurveUsdCollRatioTrigger';
20
+ export * from './MorphoBlueRatioTrigger';
20
21
  export * from './OffchainPriceTrigger';
@@ -17,4 +17,5 @@ export * from './SparkRatioTrigger';
17
17
  export * from './SparkQuotePriceTrigger';
18
18
  export * from './LiquityDebtInFrontWithLimitTrigger';
19
19
  export * from './CurveUsdCollRatioTrigger';
20
+ export * from './MorphoBlueRatioTrigger';
20
21
  export * from './OffchainPriceTrigger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.0.66-dev-1",
3
+ "version": "1.0.66-dev-2",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",