@defisaver/sdk 1.3.1 → 1.3.3

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,15 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256, EthAddress } from '../../types';
3
+ /**
4
+ * LiquityV2NewInterestRateCheckerAction - Checks new interest rate for user position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export declare class LiquityV2NewInterestRateCheckerAction extends Action {
9
+ /**
10
+ * @param market Address of the market
11
+ * @param troveId Trove id of the user
12
+ * @param interestRateChange The interest rate change to check
13
+ */
14
+ constructor(market: EthAddress, troveId: uint256, interestRateChange: uint256);
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * LiquityV2NewInterestRateCheckerAction - Checks new interest rate for user position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export class LiquityV2NewInterestRateCheckerAction extends Action {
9
+ /**
10
+ * @param market Address of the market
11
+ * @param troveId Trove id of the user
12
+ * @param interestRateChange The interest rate change to check
13
+ */
14
+ constructor(market, troveId, interestRateChange) {
15
+ super('LiquityV2NewInterestRateChecker', getAddr('Empty'), ['address', 'uint256', 'uint256'], [market, troveId, interestRateChange]);
16
+ this.mappableArgs = [
17
+ this.args[0],
18
+ this.args[1],
19
+ this.args[2],
20
+ ];
21
+ }
22
+ }
@@ -13,4 +13,5 @@ export * from './AaveV3OpenRatioCheckAction';
13
13
  export * from './MorphoBlueTargetRatioCheckAction';
14
14
  export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
+ export * from './LiquityV2NewInterestRateCheckerAction';
16
17
  export * from './FluidRatioCheckAction';
@@ -13,4 +13,5 @@ export * from './AaveV3OpenRatioCheckAction';
13
13
  export * from './MorphoBlueTargetRatioCheckAction';
14
14
  export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
+ export * from './LiquityV2NewInterestRateCheckerAction';
16
17
  export * from './FluidRatioCheckAction';
@@ -1100,6 +1100,281 @@ export declare const actionAddresses: {
1100
1100
  AaveV3DelegateCredit?: undefined;
1101
1101
  AaveV3RatioTrigger?: undefined;
1102
1102
  AaveV3RatioCheck?: undefined;
1103
+ } | {
1104
+ DFSSell: string;
1105
+ DFSSellNoFee: string;
1106
+ WrapEth: string;
1107
+ UnwrapEth: string;
1108
+ SendToken: string;
1109
+ SendTokens: string;
1110
+ SendTokenAndUnwrap: string;
1111
+ PullToken: string;
1112
+ ApproveToken: string;
1113
+ SumInputs: string;
1114
+ SubInputs: string;
1115
+ TokenBalance: string;
1116
+ PermitToken: string;
1117
+ MerklClaim: string;
1118
+ TransferNFT: string;
1119
+ TokenizedVaultAdapter: string;
1120
+ FLAction: string;
1121
+ FLAaveV3: string;
1122
+ AaveV3Withdraw: string;
1123
+ AaveV3Supply: string;
1124
+ AaveV3SetEMode: string;
1125
+ AaveV3Payback: string;
1126
+ AaveV3CollateralSwitch: string;
1127
+ AaveV3ClaimRewards: string;
1128
+ AaveV3Borrow: string;
1129
+ AaveV3ATokenPayback: string;
1130
+ AaveV3View: string;
1131
+ AaveV3DelegateWithSig: string;
1132
+ AaveV3DelegateCredit: string;
1133
+ ChangeProxyOwner?: undefined;
1134
+ AutomationV2Unsub?: undefined;
1135
+ ToggleSub?: undefined;
1136
+ UpdateSub?: undefined;
1137
+ CreateSub?: undefined;
1138
+ SDaiWrap?: undefined;
1139
+ SDaiUnwrap?: undefined;
1140
+ StarknetClaim?: undefined;
1141
+ HandleAuth?: undefined;
1142
+ SkyStake?: undefined;
1143
+ SkyUnstake?: undefined;
1144
+ SkyClaimRewards?: undefined;
1145
+ McdGenerate?: undefined;
1146
+ McdGive?: undefined;
1147
+ McdMerge?: undefined;
1148
+ McdOpen?: undefined;
1149
+ McdPayback?: undefined;
1150
+ McdSupply?: undefined;
1151
+ McdWithdraw?: undefined;
1152
+ McdClaim?: undefined;
1153
+ McdDsrDeposit?: undefined;
1154
+ McdDsrWithdraw?: undefined;
1155
+ McdTokenConverter?: undefined;
1156
+ ReflexerSupply?: undefined;
1157
+ ReflexerWithdraw?: undefined;
1158
+ ReflexerPayback?: undefined;
1159
+ ReflexerGenerate?: undefined;
1160
+ ReflexerOpen?: undefined;
1161
+ ReflexerWithdrawStuckFunds?: undefined;
1162
+ ReflexerNativeUniV2SaviourDeposit?: undefined;
1163
+ ReflexerNativeUniV2SaviourGetReserves?: undefined;
1164
+ ReflexerNativeUniV2SaviourWithdraw?: undefined;
1165
+ AaveBorrow?: undefined;
1166
+ AavePayback?: undefined;
1167
+ AaveSupply?: undefined;
1168
+ AaveWithdraw?: undefined;
1169
+ AaveCollateralSwitch?: undefined;
1170
+ AaveUnstake?: undefined;
1171
+ AaveClaimAAVE?: undefined;
1172
+ AaveClaimStkAave?: undefined;
1173
+ AaveV3SwapBorrowRateMode?: undefined;
1174
+ GhoClaimAAVE?: undefined;
1175
+ GhoUnstake?: undefined;
1176
+ GhoStake?: undefined;
1177
+ LSVWithdraw?: undefined;
1178
+ LSVBorrow?: undefined;
1179
+ LSVSupply?: undefined;
1180
+ LSVPayback?: undefined;
1181
+ LSVSell?: undefined;
1182
+ MorphoAaveV2Borrow?: undefined;
1183
+ MorphoAaveV2Payback?: undefined;
1184
+ MorphoAaveV2Supply?: undefined;
1185
+ MorphoAaveV2Withdraw?: undefined;
1186
+ MorphoClaim?: undefined;
1187
+ MorphoAaveV3Borrow?: undefined;
1188
+ MorphoAaveV3Payback?: undefined;
1189
+ MorphoAaveV3Supply?: undefined;
1190
+ MorphoAaveV3Withdraw?: undefined;
1191
+ MorphoAaveV3SetManager?: undefined;
1192
+ SparkBorrow?: undefined;
1193
+ SparkClaimRewards?: undefined;
1194
+ SparkCollateralSwitch?: undefined;
1195
+ SparkPayback?: undefined;
1196
+ SparkSetEMode?: undefined;
1197
+ SparkSpTokenPayback?: undefined;
1198
+ SparkSupply?: undefined;
1199
+ SparkSwapBorrowRateMode?: undefined;
1200
+ SparkWithdraw?: undefined;
1201
+ SparkDelegateCredit?: undefined;
1202
+ SparkDelegateWithSig?: undefined;
1203
+ SparkSPKClaim?: undefined;
1204
+ CompBorrow?: undefined;
1205
+ CompClaim?: undefined;
1206
+ CompPayback?: undefined;
1207
+ CompSupply?: undefined;
1208
+ CompWithdraw?: undefined;
1209
+ CompGetDebt?: undefined;
1210
+ CompCollateralSwitch?: undefined;
1211
+ FLAaveV2?: undefined;
1212
+ FLAaveV3NoFee?: undefined;
1213
+ FLAaveV3CarryDebt?: undefined;
1214
+ FLDyDx?: undefined;
1215
+ FLMaker?: undefined;
1216
+ FLBalancer?: undefined;
1217
+ FLSpark?: undefined;
1218
+ FLUniV3?: undefined;
1219
+ FLGho?: undefined;
1220
+ FLMorphoBlue?: undefined;
1221
+ UniSupply?: undefined;
1222
+ UniWithdraw?: undefined;
1223
+ UniCollectV3?: undefined;
1224
+ UniMintV3?: undefined;
1225
+ UniSupplyV3?: undefined;
1226
+ UniWithdrawV3?: undefined;
1227
+ UniCreatePoolV3?: undefined;
1228
+ DyDxWithdraw?: undefined;
1229
+ YearnSupply?: undefined;
1230
+ YearnWithdraw?: undefined;
1231
+ LiquityClose?: undefined;
1232
+ LiquityBorrow?: undefined;
1233
+ LiquityOpen?: undefined;
1234
+ LiquityPayback?: undefined;
1235
+ LiquityWithdraw?: undefined;
1236
+ LiquitySupply?: undefined;
1237
+ LiquitySPDeposit?: undefined;
1238
+ LiquitySPWithdraw?: undefined;
1239
+ LiquityStake?: undefined;
1240
+ LiquityUnstake?: undefined;
1241
+ LiquityEthGainToTrove?: undefined;
1242
+ LiquityClaim?: undefined;
1243
+ LiquityRedeem?: undefined;
1244
+ LiquityAdjust?: undefined;
1245
+ LiquityV2CloseLegacy?: undefined;
1246
+ LiquityV2PaybackLegacy?: undefined;
1247
+ LiquityV2Open?: undefined;
1248
+ LiquityV2Close?: undefined;
1249
+ LiquityV2Supply?: undefined;
1250
+ LiquityV2Withdraw?: undefined;
1251
+ LiquityV2Borrow?: undefined;
1252
+ LiquityV2Payback?: undefined;
1253
+ LiquityV2Claim?: undefined;
1254
+ LiquityV2Adjust?: undefined;
1255
+ LiquityV2AdjustInterestRate?: undefined;
1256
+ LiquityV2SPDeposit?: undefined;
1257
+ LiquityV2SPWithdraw?: undefined;
1258
+ LiquityV2SPClaimColl?: undefined;
1259
+ LiquityV2AdjustZombieTrove?: undefined;
1260
+ BprotocolLiquitySPDeposit?: undefined;
1261
+ BprotocolLiquitySPWithdraw?: undefined;
1262
+ LidoStake?: undefined;
1263
+ LidoWrap?: undefined;
1264
+ LidoUnwrap?: undefined;
1265
+ InstPullTokens?: undefined;
1266
+ BalancerV2Supply?: undefined;
1267
+ BalancerV2Withdraw?: undefined;
1268
+ BalancerV2Claim?: undefined;
1269
+ GUniWithdraw?: undefined;
1270
+ GUniDeposit?: undefined;
1271
+ RariDeposit?: undefined;
1272
+ RariWithdraw?: undefined;
1273
+ MStableDeposit?: undefined;
1274
+ MStableWithdraw?: undefined;
1275
+ MStableClaim?: undefined;
1276
+ McdRatioCheck?: undefined;
1277
+ GasFeeTaker?: undefined;
1278
+ CurveStethPoolDeposit?: undefined;
1279
+ CurveStethPoolWithdraw?: undefined;
1280
+ CurveDeposit?: undefined;
1281
+ CurveWithdraw?: undefined;
1282
+ McdBoostComposite?: undefined;
1283
+ McdRepayComposite?: undefined;
1284
+ FLEuler?: undefined;
1285
+ TrailingStopTrigger?: undefined;
1286
+ CBRebondTrigger?: undefined;
1287
+ CBUpdateRebondSub?: undefined;
1288
+ LiquityRatioCheck?: undefined;
1289
+ ConvexDeposit?: undefined;
1290
+ ConvexWithdraw?: undefined;
1291
+ ConvexClaim?: undefined;
1292
+ CBCreate?: undefined;
1293
+ CBRedeem?: undefined;
1294
+ CBChickenIn?: undefined;
1295
+ CBChickenOut?: undefined;
1296
+ CBCreateRebondSub?: undefined;
1297
+ FetchBondId?: undefined;
1298
+ CompV3Allow?: undefined;
1299
+ CompV3Borrow?: undefined;
1300
+ CompV3Claim?: undefined;
1301
+ CompV3Payback?: undefined;
1302
+ CompV3Supply?: undefined;
1303
+ CompV3Transfer?: undefined;
1304
+ CompV3Withdraw?: undefined;
1305
+ CurveUsdBorrow?: undefined;
1306
+ CurveUsdCreate?: undefined;
1307
+ CurveUsdPayback?: undefined;
1308
+ CurveUsdSupply?: undefined;
1309
+ CurveUsdAdjust?: undefined;
1310
+ CurveUsdWithdraw?: undefined;
1311
+ CurveUsdLevCreate?: undefined;
1312
+ CurveUsdRepay?: undefined;
1313
+ CurveUsdSwapper?: undefined;
1314
+ CurveUsdSwapperTransient?: undefined;
1315
+ CurveUsdSelfLiquidate?: undefined;
1316
+ CurveUsdSelfLiquidateWithColl?: undefined;
1317
+ CurveUsdGetDebt?: undefined;
1318
+ CurveUsdCollRatioTrigger?: undefined;
1319
+ CurveUsdCollRatioCheck?: undefined;
1320
+ CurveUsdSelfLiquidateWithCollTransient?: undefined;
1321
+ CurveUsdLevCreateTransient?: undefined;
1322
+ CurveUsdRepayTransient?: undefined;
1323
+ MorphoBlueSupply?: undefined;
1324
+ MorphoBlueSupplyCollateral?: undefined;
1325
+ MorphoBlueWithdraw?: undefined;
1326
+ MorphoBlueWithdrawCollateral?: undefined;
1327
+ MorphoBlueBorrow?: undefined;
1328
+ MorphoBluePayback?: undefined;
1329
+ MorphoBlueSetAuth?: undefined;
1330
+ MorphoBlueSetAuthWithSig?: undefined;
1331
+ MorphoTokenWrap?: undefined;
1332
+ MorphoBlueReallocateLiquidity?: undefined;
1333
+ MorphoBlueClaim?: undefined;
1334
+ LlamaLendCreate?: undefined;
1335
+ LlamaLendSupply?: undefined;
1336
+ LlamaLendBorrow?: undefined;
1337
+ LlamaLendWithdraw?: undefined;
1338
+ LlamaLendPayback?: undefined;
1339
+ LlamaLendSelfLiquidate?: undefined;
1340
+ LlamaLendGetDebt?: undefined;
1341
+ LlamaLendBoost?: undefined;
1342
+ LlamaLendRepay?: undefined;
1343
+ LlamaLendLevCreate?: undefined;
1344
+ LlamaLendSelfLiquidateWithColl?: undefined;
1345
+ EulerV2Supply?: undefined;
1346
+ EulerV2Withdraw?: undefined;
1347
+ EulerV2Borrow?: undefined;
1348
+ EulerV2Payback?: undefined;
1349
+ EulerV2CollateralSwitch?: undefined;
1350
+ EulerV2View?: undefined;
1351
+ RenzoStake?: undefined;
1352
+ EtherFiStake?: undefined;
1353
+ EtherFiWrap?: undefined;
1354
+ EtherFiUnwrap?: undefined;
1355
+ KingClaim?: undefined;
1356
+ FluidVaultT1Open?: undefined;
1357
+ FluidVaultT1Adjust?: undefined;
1358
+ FluidVaultT1Borrow?: undefined;
1359
+ FluidVaultT1Payback?: undefined;
1360
+ FluidVaultT1Withdraw?: undefined;
1361
+ FluidVaultT1Supply?: undefined;
1362
+ FluidView?: undefined;
1363
+ FluidClaim?: undefined;
1364
+ FluidDexOpen?: undefined;
1365
+ FluidDexSupply?: undefined;
1366
+ FluidDexBorrow?: undefined;
1367
+ FluidDexPayback?: undefined;
1368
+ FluidDexWithdraw?: undefined;
1369
+ PendleTokenRedeem?: undefined;
1370
+ UmbrellaClaimRewards?: undefined;
1371
+ UmbrellaStake?: undefined;
1372
+ UmbrellaUnstake?: undefined;
1373
+ SFApproveTokens?: undefined;
1374
+ AaveV3RatioTrigger?: undefined;
1375
+ GasFeeTakerL2?: undefined;
1376
+ AaveV3RatioCheck?: undefined;
1377
+ MorphoBlueView?: undefined;
1103
1378
  };
1104
1379
  };
1105
1380
  export declare const otherAddresses: {
@@ -1166,6 +1441,27 @@ export declare const otherAddresses: {
1166
1441
  GHO?: undefined;
1167
1442
  LUSD?: undefined;
1168
1443
  BLUSD?: undefined;
1444
+ } | {
1445
+ RecipeExecutor: string;
1446
+ DFSRegistry: string;
1447
+ DSGuardFactory: string;
1448
+ AdminVault: string;
1449
+ DefisaverLogger: string;
1450
+ Empty: string;
1451
+ DFSProxyRegistry?: undefined;
1452
+ ProxyRegistry?: undefined;
1453
+ McdCdpManager?: undefined;
1454
+ BCdpManager?: undefined;
1455
+ AaveDefaultMarket?: undefined;
1456
+ UniswapV3PositionManager?: undefined;
1457
+ RaiWethUniV2LPToken?: undefined;
1458
+ BalancerToken?: undefined;
1459
+ CrvToken?: undefined;
1460
+ CvxToken?: undefined;
1461
+ DAI?: undefined;
1462
+ GHO?: undefined;
1463
+ LUSD?: undefined;
1464
+ BLUSD?: undefined;
1169
1465
  };
1170
1466
  };
1171
1467
  /**
@@ -526,6 +526,40 @@ export const actionAddresses = {
526
526
  // summer.fi
527
527
  SFApproveTokens: '0x03EDC9A683f37BFB7516FF234223fFb6E38D5eb9',
528
528
  },
529
+ [NETWORKS.linea.chainId]: {
530
+ // Basic
531
+ DFSSell: '0x0a9b2080c14daf008ae87c977dfdf5f5d6d0937f',
532
+ DFSSellNoFee: '0x0000000000000000000000000000000000000000',
533
+ WrapEth: '0xB8af168883D049FF9C811ab5B5DE179f3e7d6Fb7',
534
+ UnwrapEth: '0xc5D0FF89e950a364207fC5be1b070170C874Dd87',
535
+ SendToken: '0x93A6E0dC4C4a6033922d386e4cbd9e31278A2BBa',
536
+ SendTokens: '0x3455057cE720b4c9B53D77509361E87f0F17b971',
537
+ SendTokenAndUnwrap: '0x520E8b0573a03D26D0E39a409E85E28459e24C0E',
538
+ PullToken: '0x75198244Ad7b3ebFCbFd67e6e06B1452bd6Fa831',
539
+ ApproveToken: '0x13976feAeC930Cc51986605D6f479d97a3b90FA9',
540
+ SumInputs: '0xA5b3aA3f06C2c0986E1f45ae36CD6C20392798f1',
541
+ SubInputs: '0x4C0607dAD18c0DE19f6d7b25c0B0f1990818e9d7',
542
+ TokenBalance: '0x16c9de87215D2198614dbC5419658eAdf4465025',
543
+ PermitToken: '0xcc0f04e8c34b670a1d06f4978c843952f690d3f4',
544
+ MerklClaim: '0x4E1946059Dc2426Ef3a9AE82fB30B7718a09B7E1',
545
+ TransferNFT: '0xAC17f651591f417934EeA04CF6629584Eb50A4bB',
546
+ TokenizedVaultAdapter: '0x1155BF929D78F1DeF999ACedE1867f79A7C66066',
547
+ // Flashloan
548
+ FLAction: '0x27c0bae2338ce28097122393faf90375b9395dd1',
549
+ FLAaveV3: '0x27c0bae2338ce28097122393faf90375b9395dd1',
550
+ // AaveV3
551
+ AaveV3Withdraw: '0xae56474aBe3C271579b513b6668864e39f65Ae15',
552
+ AaveV3Supply: '0x7dFF34190d0307fC234fc7E8C152C9715083eB02',
553
+ AaveV3SetEMode: '0xa2ABA81e65543d18dd1a1E4A31Bc41C4a86453cf',
554
+ AaveV3Payback: '0x125b8b832bd7f2ebd77eef148a6319ade751c44b',
555
+ AaveV3CollateralSwitch: '0xa898078f369A78CE6b8023715e8f6d2Ad7d2719f',
556
+ AaveV3ClaimRewards: '0x4839d021A24820e57C31D386d430e2e82694F73B',
557
+ AaveV3Borrow: '0x9D95de57631DD8Ac071892843DA67FEe52EA3962',
558
+ AaveV3ATokenPayback: '0xedfc68e2874b0afc0963e18ae4d68522aec7f97d',
559
+ AaveV3View: '0xc9d6efa6e08b66a5cdc516bcd5807c2fa69e0f2a',
560
+ AaveV3DelegateWithSig: '0x169D6E128238ebabF86032Ae9da65938eaD7F69e',
561
+ AaveV3DelegateCredit: '0x2A588cBCBd5e6c6ba7ED0E260B8107F599017DDE',
562
+ },
529
563
  };
530
564
  export const otherAddresses = {
531
565
  [NETWORKS.ethereum.chainId]: {
@@ -576,6 +610,14 @@ export const otherAddresses = {
576
610
  DefisaverLogger: '0xc9D6EfA6e08B66a5Cdc516Bcd5807c2fa69E0f2A',
577
611
  Empty: '0x0000000000000000000000000000000000000000',
578
612
  },
613
+ [NETWORKS.linea.chainId]: {
614
+ RecipeExecutor: '0x50bCFC115283dF48Ab6382551B9B93b08E197747',
615
+ DFSRegistry: '0x09fBeC68D216667C3262211D2E5609578951dCE0',
616
+ DSGuardFactory: '0x02a516861f41262f22617511d00b6fccab65f762',
617
+ AdminVault: '0x71a9ef13c960c2f1dd17962d3592a5bcdfad6de0',
618
+ DefisaverLogger: '0x44e98bb58d725f2ef93a195f518b335dcb784c78',
619
+ Empty: '0x0000000000000000000000000000000000000000',
620
+ },
579
621
  };
580
622
  /**
581
623
  *
package/esm/src/config.js CHANGED
@@ -43,6 +43,14 @@ export const NETWORKS = {
43
43
  rpcUrls: [],
44
44
  nativeCurrency: { name: 'Ethereum', decimals: 18, symbol: 'ETH' },
45
45
  },
46
+ linea: {
47
+ chainId: 59144,
48
+ chainName: 'Linea',
49
+ blockExplorerUrls: ['https://lineascan.build/'],
50
+ iconUrls: ['https://bridge.base.org/icons/base.svg'],
51
+ rpcUrls: [],
52
+ nativeCurrency: { name: 'Ethereum', decimals: 18, symbol: 'ETH' },
53
+ },
46
54
  };
47
55
  /**
48
56
  *