@defisaver/sdk 1.2.31 → 1.2.32

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.
@@ -27,6 +27,7 @@ import * as lsv from './lsv';
27
27
  import * as curveusd from './curveusd';
28
28
  import * as spark from './spark';
29
29
  import * as morphoblue from './morpho-blue';
30
+ import * as summerfi from './summerfi';
30
31
  import * as llamalend from './llamalend';
31
32
  import * as merkl from './merkl';
32
33
  import * as eulerV2 from './eulerV2';
@@ -37,4 +38,4 @@ import * as renzo from './renzo';
37
38
  import * as etherfi from './etherfi';
38
39
  import * as fluid from './fluid';
39
40
  import * as pendle from './pendle';
40
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, };
41
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, };
@@ -27,6 +27,7 @@ import * as lsv from './lsv';
27
27
  import * as curveusd from './curveusd';
28
28
  import * as spark from './spark';
29
29
  import * as morphoblue from './morpho-blue';
30
+ import * as summerfi from './summerfi';
30
31
  import * as llamalend from './llamalend';
31
32
  import * as merkl from './merkl';
32
33
  import * as eulerV2 from './eulerV2';
@@ -37,4 +38,4 @@ import * as renzo from './renzo';
37
38
  import * as etherfi from './etherfi';
38
39
  import * as fluid from './fluid';
39
40
  import * as pendle from './pendle';
40
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, };
41
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, };
@@ -0,0 +1,14 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export declare class SFApproveTokensAction extends Action {
7
+ /**
8
+ * @param sfProxy Summerfi proxy address
9
+ * @param spender DSProxy address
10
+ * @param tokens List of assets to approve
11
+ * @param allowances Approve amounts
12
+ */
13
+ constructor(sfProxy: EthAddress, spender: EthAddress, tokens: EthAddress[], allowances: uint256[]);
14
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export class SFApproveTokensAction extends Action {
7
+ /**
8
+ * @param sfProxy Summerfi proxy address
9
+ * @param spender DSProxy address
10
+ * @param tokens List of assets to approve
11
+ * @param allowances Approve amounts
12
+ */
13
+ constructor(sfProxy, spender, tokens, allowances) {
14
+ super('SFApproveTokens', getAddr('SFApproveTokens'), ['address', 'address', 'address[]', 'uint256[]'], [sfProxy, spender, tokens, allowances]);
15
+ this.mappableArgs = [];
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export * from './SFApproveTokensAction';
@@ -0,0 +1 @@
1
+ export * from './SFApproveTokensAction';
@@ -264,6 +264,7 @@ export declare const actionAddresses: {
264
264
  FluidDexPayback: string;
265
265
  FluidDexWithdraw: string;
266
266
  PendleTokenRedeem: string;
267
+ SFApproveTokens: string;
267
268
  AaveV3DelegateCredit?: undefined;
268
269
  AaveV3RatioTrigger?: undefined;
269
270
  GasFeeTakerL2?: undefined;
@@ -318,6 +319,7 @@ export declare const actionAddresses: {
318
319
  CompV3Supply: string;
319
320
  CompV3Transfer: string;
320
321
  CompV3Withdraw: string;
322
+ SFApproveTokens: string;
321
323
  AutomationV2Unsub?: undefined;
322
324
  UpdateSub?: undefined;
323
325
  TransferNFT?: undefined;
@@ -612,6 +614,7 @@ export declare const actionAddresses: {
612
614
  FluidDexBorrow: string;
613
615
  FluidDexPayback: string;
614
616
  FluidDexWithdraw: string;
617
+ SFApproveTokens: string;
615
618
  AutomationV2Unsub?: undefined;
616
619
  SDaiWrap?: undefined;
617
620
  SDaiUnwrap?: undefined;
@@ -870,6 +873,7 @@ export declare const actionAddresses: {
870
873
  FluidVaultT1Supply: string;
871
874
  FluidView: string;
872
875
  TokenizedVaultAdapter: string;
876
+ SFApproveTokens: string;
873
877
  AutomationV2Unsub?: undefined;
874
878
  SendTokenAndUnwrap?: undefined;
875
879
  SDaiWrap?: undefined;
@@ -303,6 +303,8 @@ export const actionAddresses = {
303
303
  FluidDexWithdraw: '0x14d5bb8E96fbf7C1f9A8E3EFD0eF5fe6832ff3cd',
304
304
  // pendle
305
305
  PendleTokenRedeem: '0x94682544aCC5f4D82ECB1ab97998baa0e428EA0f',
306
+ // summer.fi
307
+ SFApproveTokens: '0x0aC29D44eeC8e8f3b010c2e8FC960957db0c8298',
306
308
  },
307
309
  [NETWORKS.optimism.chainId]: {
308
310
  DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
@@ -358,6 +360,8 @@ export const actionAddresses = {
358
360
  CompV3Supply: '0xf4c3D99c43E1DB968CF92770DaE6d377697b0B81',
359
361
  CompV3Transfer: '0x3e5af71709a9e591c5b25422a4419164bb5aba4b',
360
362
  CompV3Withdraw: '0x744ad24e92d092e0788d429f5178286672288782',
363
+ // summer.fi
364
+ SFApproveTokens: '0xcc63B281b29a4c7f33aF780e9B480A15eb676e81',
361
365
  },
362
366
  [NETWORKS.arbitrum.chainId]: {
363
367
  DFSSell: '0x1393eef11454ab068dd5e0d0be5eb922603eef1a',
@@ -440,6 +444,8 @@ export const actionAddresses = {
440
444
  FluidDexBorrow: '0x8626b70CDf64e557fDdcFbcb783833Dc314d95F4',
441
445
  FluidDexPayback: '0xA9B46Da016F22cf9F8841A30881bB88E2Ad5CA94',
442
446
  FluidDexWithdraw: '0x076D5434793798b153298bF70b014f5E6145aB2E',
447
+ // summer.fi
448
+ SFApproveTokens: '0x98101bDBFaA3f8efa4A14a5A6a2f9A20D514a5D5',
443
449
  },
444
450
  [NETWORKS.base.chainId]: {
445
451
  // Basic
@@ -510,6 +516,8 @@ export const actionAddresses = {
510
516
  FluidVaultT1Supply: '0x028ACA45244d4897ff80ef65ed0b735Bb0D4B0A5',
511
517
  FluidView: '0x6cd4D6af4F292817eA2A2311F099dF26cd015028',
512
518
  TokenizedVaultAdapter: '0x88cf6cfa51b6f771570f6df450edf1c886212d3e',
519
+ // summer.fi
520
+ SFApproveTokens: '0x03EDC9A683f37BFB7516FF234223fFb6E38D5eb9',
513
521
  },
514
522
  };
515
523
  export const otherAddresses = {
@@ -275,6 +275,7 @@ declare const actionAddressesAllChains: {
275
275
  FluidDexPayback: string;
276
276
  FluidDexWithdraw: string;
277
277
  PendleTokenRedeem: string;
278
+ SFApproveTokens: string;
278
279
  AaveV3DelegateCredit?: undefined;
279
280
  AaveV3RatioTrigger?: undefined;
280
281
  GasFeeTakerL2?: undefined;
@@ -329,6 +330,7 @@ declare const actionAddressesAllChains: {
329
330
  CompV3Supply: string;
330
331
  CompV3Transfer: string;
331
332
  CompV3Withdraw: string;
333
+ SFApproveTokens: string;
332
334
  AutomationV2Unsub?: undefined;
333
335
  UpdateSub?: undefined;
334
336
  TransferNFT?: undefined;
@@ -623,6 +625,7 @@ declare const actionAddressesAllChains: {
623
625
  FluidDexBorrow: string;
624
626
  FluidDexPayback: string;
625
627
  FluidDexWithdraw: string;
628
+ SFApproveTokens: string;
626
629
  AutomationV2Unsub?: undefined;
627
630
  SDaiWrap?: undefined;
628
631
  SDaiUnwrap?: undefined;
@@ -881,6 +884,7 @@ declare const actionAddressesAllChains: {
881
884
  FluidVaultT1Supply: string;
882
885
  FluidView: string;
883
886
  TokenizedVaultAdapter: string;
887
+ SFApproveTokens: string;
884
888
  AutomationV2Unsub?: undefined;
885
889
  SendTokenAndUnwrap?: undefined;
886
890
  SDaiWrap?: undefined;
@@ -1353,6 +1357,7 @@ declare const actionAddresses: (chainId?: null) => {
1353
1357
  FluidDexPayback: string;
1354
1358
  FluidDexWithdraw: string;
1355
1359
  PendleTokenRedeem: string;
1360
+ SFApproveTokens: string;
1356
1361
  AaveV3DelegateCredit?: undefined;
1357
1362
  AaveV3RatioTrigger?: undefined;
1358
1363
  GasFeeTakerL2?: undefined;
@@ -1407,6 +1412,7 @@ declare const actionAddresses: (chainId?: null) => {
1407
1412
  CompV3Supply: string;
1408
1413
  CompV3Transfer: string;
1409
1414
  CompV3Withdraw: string;
1415
+ SFApproveTokens: string;
1410
1416
  AutomationV2Unsub?: undefined;
1411
1417
  UpdateSub?: undefined;
1412
1418
  TransferNFT?: undefined;
@@ -1701,6 +1707,7 @@ declare const actionAddresses: (chainId?: null) => {
1701
1707
  FluidDexBorrow: string;
1702
1708
  FluidDexPayback: string;
1703
1709
  FluidDexWithdraw: string;
1710
+ SFApproveTokens: string;
1704
1711
  AutomationV2Unsub?: undefined;
1705
1712
  SDaiWrap?: undefined;
1706
1713
  SDaiUnwrap?: undefined;
@@ -1959,6 +1966,7 @@ declare const actionAddresses: (chainId?: null) => {
1959
1966
  FluidVaultT1Supply: string;
1960
1967
  FluidView: string;
1961
1968
  TokenizedVaultAdapter: string;
1969
+ SFApproveTokens: string;
1962
1970
  AutomationV2Unsub?: undefined;
1963
1971
  SendTokenAndUnwrap?: undefined;
1964
1972
  SDaiWrap?: undefined;
@@ -2574,6 +2582,7 @@ declare const _default: {
2574
2582
  FluidDexPayback: string;
2575
2583
  FluidDexWithdraw: string;
2576
2584
  PendleTokenRedeem: string;
2585
+ SFApproveTokens: string;
2577
2586
  AaveV3DelegateCredit?: undefined;
2578
2587
  AaveV3RatioTrigger?: undefined;
2579
2588
  GasFeeTakerL2?: undefined;
@@ -2628,6 +2637,7 @@ declare const _default: {
2628
2637
  CompV3Supply: string;
2629
2638
  CompV3Transfer: string;
2630
2639
  CompV3Withdraw: string;
2640
+ SFApproveTokens: string;
2631
2641
  AutomationV2Unsub?: undefined;
2632
2642
  UpdateSub?: undefined;
2633
2643
  TransferNFT?: undefined;
@@ -2922,6 +2932,7 @@ declare const _default: {
2922
2932
  FluidDexBorrow: string;
2923
2933
  FluidDexPayback: string;
2924
2934
  FluidDexWithdraw: string;
2935
+ SFApproveTokens: string;
2925
2936
  AutomationV2Unsub?: undefined;
2926
2937
  SDaiWrap?: undefined;
2927
2938
  SDaiUnwrap?: undefined;
@@ -3180,6 +3191,7 @@ declare const _default: {
3180
3191
  FluidVaultT1Supply: string;
3181
3192
  FluidView: string;
3182
3193
  TokenizedVaultAdapter: string;
3194
+ SFApproveTokens: string;
3183
3195
  AutomationV2Unsub?: undefined;
3184
3196
  SendTokenAndUnwrap?: undefined;
3185
3197
  SDaiWrap?: undefined;
@@ -3652,6 +3664,7 @@ declare const _default: {
3652
3664
  FluidDexPayback: string;
3653
3665
  FluidDexWithdraw: string;
3654
3666
  PendleTokenRedeem: string;
3667
+ SFApproveTokens: string;
3655
3668
  AaveV3DelegateCredit?: undefined;
3656
3669
  AaveV3RatioTrigger?: undefined;
3657
3670
  GasFeeTakerL2?: undefined;
@@ -3706,6 +3719,7 @@ declare const _default: {
3706
3719
  CompV3Supply: string;
3707
3720
  CompV3Transfer: string;
3708
3721
  CompV3Withdraw: string;
3722
+ SFApproveTokens: string;
3709
3723
  AutomationV2Unsub?: undefined;
3710
3724
  UpdateSub?: undefined;
3711
3725
  TransferNFT?: undefined;
@@ -4000,6 +4014,7 @@ declare const _default: {
4000
4014
  FluidDexBorrow: string;
4001
4015
  FluidDexPayback: string;
4002
4016
  FluidDexWithdraw: string;
4017
+ SFApproveTokens: string;
4003
4018
  AutomationV2Unsub?: undefined;
4004
4019
  SDaiWrap?: undefined;
4005
4020
  SDaiUnwrap?: undefined;
@@ -4258,6 +4273,7 @@ declare const _default: {
4258
4273
  FluidVaultT1Supply: string;
4259
4274
  FluidView: string;
4260
4275
  TokenizedVaultAdapter: string;
4276
+ SFApproveTokens: string;
4261
4277
  AutomationV2Unsub?: undefined;
4262
4278
  SendTokenAndUnwrap?: undefined;
4263
4279
  SDaiWrap?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.2.31",
3
+ "version": "1.2.32",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -27,6 +27,7 @@ import * as lsv from './lsv';
27
27
  import * as curveusd from './curveusd';
28
28
  import * as spark from './spark';
29
29
  import * as morphoblue from './morpho-blue';
30
+ import * as summerfi from './summerfi';
30
31
  import * as llamalend from './llamalend';
31
32
  import * as merkl from './merkl';
32
33
  import * as eulerV2 from './eulerV2';
@@ -68,6 +69,7 @@ export {
68
69
  spark,
69
70
  curveusd,
70
71
  morphoblue,
72
+ summerfi,
71
73
  llamalend,
72
74
  merkl,
73
75
  eulerV2,
@@ -0,0 +1,29 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256 } from '../../types';
4
+
5
+ /**
6
+ * @category Summerfi
7
+ */
8
+ export class SFApproveTokensAction extends Action {
9
+ /**
10
+ * @param sfProxy Summerfi proxy address
11
+ * @param spender DSProxy address
12
+ * @param tokens List of assets to approve
13
+ * @param allowances Approve amounts
14
+ */
15
+ constructor(
16
+ sfProxy: EthAddress,
17
+ spender: EthAddress,
18
+ tokens: EthAddress[],
19
+ allowances: uint256[],
20
+ ) {
21
+ super(
22
+ 'SFApproveTokens',
23
+ getAddr('SFApproveTokens'),
24
+ ['address', 'address', 'address[]', 'uint256[]'],
25
+ [sfProxy, spender, tokens, allowances],
26
+ );
27
+ this.mappableArgs = [];
28
+ }
29
+ }
@@ -0,0 +1 @@
1
+ export * from './SFApproveTokensAction';
package/src/addresses.ts CHANGED
@@ -348,6 +348,9 @@ export const actionAddresses = {
348
348
 
349
349
  // pendle
350
350
  PendleTokenRedeem: '0x94682544aCC5f4D82ECB1ab97998baa0e428EA0f',
351
+
352
+ // summer.fi
353
+ SFApproveTokens: '0x0aC29D44eeC8e8f3b010c2e8FC960957db0c8298',
351
354
  },
352
355
  [NETWORKS.optimism.chainId]: {
353
356
  DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
@@ -410,6 +413,8 @@ export const actionAddresses = {
410
413
  CompV3Transfer: '0x3e5af71709a9e591c5b25422a4419164bb5aba4b',
411
414
  CompV3Withdraw: '0x744ad24e92d092e0788d429f5178286672288782',
412
415
 
416
+ // summer.fi
417
+ SFApproveTokens: '0xcc63B281b29a4c7f33aF780e9B480A15eb676e81',
413
418
  },
414
419
  [NETWORKS.arbitrum.chainId]: {
415
420
  DFSSell: '0x1393eef11454ab068dd5e0d0be5eb922603eef1a',
@@ -500,6 +505,9 @@ export const actionAddresses = {
500
505
  FluidDexBorrow: '0x8626b70CDf64e557fDdcFbcb783833Dc314d95F4',
501
506
  FluidDexPayback: '0xA9B46Da016F22cf9F8841A30881bB88E2Ad5CA94',
502
507
  FluidDexWithdraw: '0x076D5434793798b153298bF70b014f5E6145aB2E',
508
+
509
+ // summer.fi
510
+ SFApproveTokens: '0x98101bDBFaA3f8efa4A14a5A6a2f9A20D514a5D5',
503
511
  },
504
512
  [NETWORKS.base.chainId]: {
505
513
  // Basic
@@ -577,6 +585,9 @@ export const actionAddresses = {
577
585
  FluidView: '0x6cd4D6af4F292817eA2A2311F099dF26cd015028',
578
586
 
579
587
  TokenizedVaultAdapter: '0x88cf6cfa51b6f771570f6df450edf1c886212d3e',
588
+
589
+ // summer.fi
590
+ SFApproveTokens: '0x03EDC9A683f37BFB7516FF234223fFb6E38D5eb9',
580
591
  },
581
592
  };
582
593