@gearbox-protocol/sdk 16.5.3 → 16.6.0-next.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.
Files changed (55) hide show
  1. package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +1 -14
  2. package/dist/cjs/onchain/constants/address-provider.js +0 -2
  3. package/dist/cjs/onchain/constants/index.js +0 -1
  4. package/dist/cjs/onchain/index.js +1 -1
  5. package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +1 -1
  6. package/dist/cjs/onchain/market/adapters/contracts/AbstractAdapter.js +6 -0
  7. package/dist/cjs/onchain/market/adapters/contracts/MidasGatewayAdapterContract.js +41 -5
  8. package/dist/cjs/onchain/market/credit/CreditSuite.js +7 -0
  9. package/dist/cjs/onchain/market/index.js +1 -0
  10. package/dist/cjs/onchain/market/rwa/RWARegistry.js +4 -7
  11. package/dist/cjs/onchain/market/rwa/index.js +1 -0
  12. package/dist/esm/dev/AccountOpener.js +1 -1
  13. package/dist/esm/dev/withdrawalUtils.js +1 -1
  14. package/dist/esm/history/trace/extractTransfers.js +1 -1
  15. package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +3 -16
  16. package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +1 -1
  17. package/dist/esm/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
  18. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
  19. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
  20. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
  21. package/dist/esm/onchain/base/TokensMeta.js +3 -3
  22. package/dist/esm/onchain/constants/address-provider.js +1 -2
  23. package/dist/esm/onchain/constants/index.js +2 -2
  24. package/dist/esm/onchain/core/createAddressProvider.js +1 -1
  25. package/dist/esm/onchain/index.js +3 -3
  26. package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +1 -1
  27. package/dist/esm/onchain/market/adapters/contracts/AbstractAdapter.js +6 -0
  28. package/dist/esm/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
  29. package/dist/esm/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
  30. package/dist/esm/onchain/market/adapters/contracts/MidasGatewayAdapterContract.js +42 -6
  31. package/dist/esm/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
  32. package/dist/esm/onchain/market/credit/CreditSuite.js +7 -0
  33. package/dist/esm/onchain/market/index.js +2 -2
  34. package/dist/esm/onchain/market/pool/PoolV310Contract.js +1 -1
  35. package/dist/esm/onchain/market/rwa/RWARegistry.js +4 -8
  36. package/dist/esm/onchain/market/rwa/createDegenNFT.js +1 -1
  37. package/dist/esm/onchain/market/rwa/index.js +2 -2
  38. package/dist/esm/onchain/market/zapper/IETHZapperContract.js +1 -1
  39. package/dist/esm/onchain/market/zapper/ZapperContract.js +1 -1
  40. package/dist/esm/onchain/preview/preview/previewPoolPositionOperation.js +2 -2
  41. package/dist/esm/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
  42. package/dist/types/onchain/constants/address-provider.d.ts +1 -2
  43. package/dist/types/onchain/constants/index.d.ts +2 -2
  44. package/dist/types/onchain/index.d.ts +3 -3
  45. package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +6 -0
  46. package/dist/types/onchain/market/adapters/contracts/MidasGatewayAdapterContract.d.ts +15 -5
  47. package/dist/types/onchain/market/adapters/types.d.ts +8 -0
  48. package/dist/types/onchain/market/credit/CreditSuite.d.ts +5 -0
  49. package/dist/types/onchain/market/index.d.ts +2 -2
  50. package/dist/types/onchain/market/rwa/RWARegistry.d.ts +2 -1
  51. package/dist/types/onchain/market/rwa/index.d.ts +2 -2
  52. package/package.json +1 -1
  53. package/dist/cjs/onchain/accounts/utils/midasUtils.js +0 -76
  54. package/dist/esm/onchain/accounts/utils/midasUtils.js +0 -75
  55. package/dist/types/onchain/accounts/utils/midasUtils.d.ts +0 -39
@@ -16,7 +16,6 @@ require("../market/index.js");
16
16
  const require_onchain_accounts_credit_account_compressor_CreditAccountCompressor = require("./credit-account-compressor/CreditAccountCompressor.js");
17
17
  require("./credit-account-compressor/index.js");
18
18
  const require_onchain_accounts_multicall_utils = require("./multicall-utils.js");
19
- const require_onchain_accounts_utils_midasUtils = require("./utils/midasUtils.js");
20
19
  let viem = require("viem");
21
20
  //#region src/onchain/accounts/CreditAccountsServiceV310.ts
22
21
  /**
@@ -213,7 +212,7 @@ var CreditAccountsServiceV310 = class extends require_onchain_base_SDKConstruct.
213
212
  }),
214
213
  ...callsAfter ?? []
215
214
  ];
216
- calls = await this.#prependMidasReceiveGreenlist(cm.address, calls);
215
+ calls = [...await cmSuite.openingCalls(), ...calls];
217
216
  calls = await this.prependPriceUpdates(cm.address, calls);
218
217
  const tx = reopenCreditAccount ? cmSuite.multicallTx(reopenCreditAccount, calls, rwaOptions) : cmSuite.openCreditAccountTx(to, calls, referralCode, rwaOptions);
219
218
  tx.value = ethAmount.toString(10);
@@ -440,18 +439,6 @@ var CreditAccountsServiceV310 = class extends require_onchain_base_SDKConstruct.
440
439
  return this.sdk.addressProvider.mustGetLatest(require_onchain_constants_address_provider.AP_REWARDS_COMPRESSOR, require_onchain_constants_versions.VERSION_RANGE_310)[0];
441
440
  }
442
441
  /**
443
- * {@inheritDoc ICreditAccountsService.prependMidasReceiveGreenlist}
444
- */
445
- async #prependMidasReceiveGreenlist(creditManager, calls) {
446
- const cm = this.sdk.marketRegister.findCreditManager(creditManager);
447
- return require_onchain_accounts_utils_midasUtils.prependMidasReceiveGreenlist({
448
- cm,
449
- client: this.client,
450
- calls,
451
- logger: this.logger
452
- });
453
- }
454
- /**
455
442
  * Withdrawal compressor of the current chain.
456
443
  * @throws If no withdrawal compressor is supported on the current chain.
457
444
  **/
@@ -33,7 +33,6 @@ const AP_WETH_GATEWAY = "WETH_GATEWAY";
33
33
  const AP_WETH_TOKEN = "WETH_TOKEN";
34
34
  const AP_ZAPPER_REGISTER = "ZAPPER_REGISTER";
35
35
  const AP_ZERO_PRICE_FEED = "ZERO_PRICE_FEED";
36
- const AP_RWA_COMPRESSOR = "GLOBAL::RWA_COMPRESSOR";
37
36
  const AP_REDEMPTION_LOGGER = "LOCAL::REDEMPTION_LOGGER";
38
37
  /**
39
38
  * Default address provider address for v3.1.0
@@ -69,7 +68,6 @@ exports.AP_PRICE_ORACLE = AP_PRICE_ORACLE;
69
68
  exports.AP_REDEMPTION_LOGGER = AP_REDEMPTION_LOGGER;
70
69
  exports.AP_REWARDS_COMPRESSOR = AP_REWARDS_COMPRESSOR;
71
70
  exports.AP_ROUTER = AP_ROUTER;
72
- exports.AP_RWA_COMPRESSOR = AP_RWA_COMPRESSOR;
73
71
  exports.AP_TOKEN_COMPRESSOR = AP_TOKEN_COMPRESSOR;
74
72
  exports.AP_TREASURY = AP_TREASURY;
75
73
  exports.AP_WETH_GATEWAY = AP_WETH_GATEWAY;
@@ -35,7 +35,6 @@ exports.AP_PRICE_ORACLE = require_onchain_constants_address_provider.AP_PRICE_OR
35
35
  exports.AP_REDEMPTION_LOGGER = require_onchain_constants_address_provider.AP_REDEMPTION_LOGGER;
36
36
  exports.AP_REWARDS_COMPRESSOR = require_onchain_constants_address_provider.AP_REWARDS_COMPRESSOR;
37
37
  exports.AP_ROUTER = require_onchain_constants_address_provider.AP_ROUTER;
38
- exports.AP_RWA_COMPRESSOR = require_onchain_constants_address_provider.AP_RWA_COMPRESSOR;
39
38
  exports.AP_TOKEN_COMPRESSOR = require_onchain_constants_address_provider.AP_TOKEN_COMPRESSOR;
40
39
  exports.AP_TREASURY = require_onchain_constants_address_provider.AP_TREASURY;
41
40
  exports.AP_WETH_GATEWAY = require_onchain_constants_address_provider.AP_WETH_GATEWAY;
@@ -331,7 +331,6 @@ exports.AP_PRICE_ORACLE = require_onchain_constants_address_provider.AP_PRICE_OR
331
331
  exports.AP_REDEMPTION_LOGGER = require_onchain_constants_address_provider.AP_REDEMPTION_LOGGER;
332
332
  exports.AP_REWARDS_COMPRESSOR = require_onchain_constants_address_provider.AP_REWARDS_COMPRESSOR;
333
333
  exports.AP_ROUTER = require_onchain_constants_address_provider.AP_ROUTER;
334
- exports.AP_RWA_COMPRESSOR = require_onchain_constants_address_provider.AP_RWA_COMPRESSOR;
335
334
  exports.AP_TOKEN_COMPRESSOR = require_onchain_constants_address_provider.AP_TOKEN_COMPRESSOR;
336
335
  exports.AP_TREASURY = require_onchain_constants_address_provider.AP_TREASURY;
337
336
  exports.AP_WETH_GATEWAY = require_onchain_constants_address_provider.AP_WETH_GATEWAY;
@@ -476,6 +475,7 @@ exports.RAMP_DURATION_BY_NETWORK = require_onchain_constants_networks.RAMP_DURAT
476
475
  exports.RAY = require_onchain_constants_math.RAY;
477
476
  exports.RAY_DECIMALS_POW = require_onchain_constants_math.RAY_DECIMALS_POW;
478
477
  exports.RWARegistry = require_onchain_market_rwa_RWARegistry.RWARegistry;
478
+ exports.RWA_COMPRESSOR_ADDRESS = require_onchain_market_rwa_RWARegistry.RWA_COMPRESSOR_ADDRESS;
479
479
  exports.RWA_LIQUIDATOR_MIDAS = require_onchain_market_rwa_midas_constants.RWA_LIQUIDATOR_MIDAS;
480
480
  exports.RWA_LIQUIDATOR_SECURITIZE = require_onchain_market_rwa_securitize_constants.RWA_LIQUIDATOR_SECURITIZE;
481
481
  exports.RWA_ON_DEMAND_LP_MONOPOLIZED = require_onchain_base_token_types.RWA_ON_DEMAND_LP_MONOPOLIZED;
@@ -66,7 +66,7 @@ const adapterConstructorAbi = {
66
66
  ["INFINIFI_UNWINDING"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.PHANTOM_TOKEN_ADAPTER_ABI },
67
67
  ["SECURITIZE_REDEMPTION"]: {
68
68
  310: require_onchain_market_adapters_abi_conctructorAbiPatterns.PHANTOM_TOKEN_ADAPTER_ABI,
69
- 311: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI
69
+ 311: require_onchain_market_adapters_abi_conctructorAbiPatterns.PHANTOM_TOKEN_ADAPTER_ABI
70
70
  },
71
71
  ["STAKING_REWARDS"]: { 312: require_onchain_market_adapters_abi_conctructorAbiPatterns.STAKING_REWARDS_ADAPTER_ABI },
72
72
  ["MIDAS_ISSUANCE_VAULT"]: {
@@ -129,6 +129,12 @@ var AbstractAdapterContract = class extends require_onchain_base_BaseContract.Ba
129
129
  return false;
130
130
  }
131
131
  /**
132
+ * {@inheritDoc IAdapterContract.openingCalls}
133
+ */
134
+ async openingCalls() {
135
+ return [];
136
+ }
137
+ /**
132
138
  * Applies the balance changes of a decoded adapter call to the running
133
139
  * balances, mutating them in place. Overrides should express changes via
134
140
  * {@link setLeftover} (diff-style calls) and {@link spendExact}
@@ -14,6 +14,12 @@ const receiveGreenlistCalldata = (0, viem.encodeFunctionData)({
14
14
  abi,
15
15
  functionName: "receiveGreenlist"
16
16
  });
17
+ const MGLOBAL_MTOKEN = (0, viem.getAddress)("0x7433806912Eae67919e66aea853d46Fa0aef98A8");
18
+ /**
19
+ * Permissionless gateways have no greenlist and reject `receiveGreenlist`,
20
+ * see MidasMode in integrations-v3
21
+ */
22
+ const MIDAS_MODE_PERMISSIONLESS = 0;
17
23
  var MidasGatewayAdapterContract = class extends require_onchain_market_adapters_contracts_AbstractAdapter.AbstractAdapterContract {
18
24
  #version;
19
25
  #gateway;
@@ -21,6 +27,7 @@ var MidasGatewayAdapterContract = class extends require_onchain_market_adapters_
21
27
  #quoteToken;
22
28
  #phantomToken;
23
29
  #referrerId;
30
+ #mode;
24
31
  constructor(sdk, args) {
25
32
  super(sdk, {
26
33
  ...args,
@@ -126,6 +133,35 @@ var MidasGatewayAdapterContract = class extends require_onchain_market_adapters_
126
133
  if (this.#referrerId === void 0) throw new require_onchain_base_errors.MissingSerializedParamsError("referrerId");
127
134
  return this.#referrerId;
128
135
  }
136
+ /**
137
+ * Gateway `mode` is immutable on-chain, so the first read is reused.
138
+ */
139
+ async mode() {
140
+ if (!this.#mode) this.#mode = this.client.readContract({
141
+ address: this.targetContract,
142
+ abi: this.protocolAbi,
143
+ functionName: "mode"
144
+ });
145
+ return this.#mode;
146
+ }
147
+ /**
148
+ * {@inheritDoc IAdapterContract.openingCalls}
149
+ */
150
+ async openingCalls() {
151
+ if ((0, viem.isAddressEqual)(this.mToken, MGLOBAL_MTOKEN)) {
152
+ this.logger?.debug(`midas: skipping receiveGreenlist for mGLOBAL ${this.mToken}`);
153
+ return [];
154
+ }
155
+ if (await this.mode() === MIDAS_MODE_PERMISSIONLESS) {
156
+ this.logger?.debug(`midas: gateway ${this.targetContract} is permissionless, nothing to greenlist`);
157
+ return [];
158
+ }
159
+ this.logger?.debug(`midas: greenlisting the credit account via gateway adapter ${this.address}`);
160
+ return [{
161
+ target: this.address,
162
+ callData: receiveGreenlistCalldata
163
+ }];
164
+ }
129
165
  stateHuman(raw) {
130
166
  return {
131
167
  ...super.stateHuman(raw),
@@ -177,11 +213,11 @@ var MidasGatewayAdapterContract = class extends require_onchain_market_adapters_
177
213
  return calldata === receiveGreenlistCalldata;
178
214
  }
179
215
  /**
180
- * `receiveGreenlist()` is prepended by `prependMidasReceiveGreenlist`
181
- * before the balance bracket when the multicall mints a permissioned
182
- * mToken: it only grants the Midas greenlisted role to the credit
183
- * account and is balance-neutral, so it is legal outside a bracket and
184
- * leaves balances untouched.
216
+ * `receiveGreenlist()` is prepended by {@link openingCalls} before the
217
+ * balance bracket when a permissioned mToken is minted: it only grants
218
+ * the Midas greenlisted role to the credit account and is
219
+ * balance-neutral, so it is legal outside a bracket and leaves balances
220
+ * untouched.
185
221
  */
186
222
  replayOutOfBracketCall(_balances, calldata) {
187
223
  return this.isReceiveGreenlist(calldata);
@@ -179,6 +179,13 @@ var CreditSuite = class extends require_onchain_base_SDKConstruct.SDKConstruct {
179
179
  return rwaFactory ? rwaFactory.openCreditAccount(this.creditManager.address, calls, rwaOptions) : this.creditFacade.openCreditAccount(to, calls, referralCode ?? 0n);
180
180
  }
181
181
  /**
182
+ * Calls to run first in the multicall of a freshly opened account on this
183
+ * suite; use before {@link openCreditAccountTx}.
184
+ */
185
+ async openingCalls() {
186
+ return (await Promise.all(this.creditManager.adapters.values().map((a) => a.openingCalls()))).flat();
187
+ }
188
+ /**
182
189
  * Router configured for this credit suite.
183
190
  */
184
191
  get router() {
@@ -220,6 +220,7 @@ exports.PriceFeedRegister = require_onchain_market_pricefeeds_PriceFeedsRegister
220
220
  exports.PriceOracleV310Contract = require_onchain_market_oracle_PriceOracleV310Contract.PriceOracleV310Contract;
221
221
  exports.PythPriceFeed = require_onchain_market_pricefeeds_PythPriceFeed.PythPriceFeed;
222
222
  exports.RWARegistry = require_onchain_market_rwa_RWARegistry.RWARegistry;
223
+ exports.RWA_COMPRESSOR_ADDRESS = require_onchain_market_rwa_RWARegistry.RWA_COMPRESSOR_ADDRESS;
223
224
  exports.RWA_LIQUIDATOR_MIDAS = require_onchain_market_rwa_midas_constants.RWA_LIQUIDATOR_MIDAS;
224
225
  exports.RWA_LIQUIDATOR_SECURITIZE = require_onchain_market_rwa_securitize_constants.RWA_LIQUIDATOR_SECURITIZE;
225
226
  exports.RedstonePriceFeedContract = require_onchain_market_pricefeeds_RedstonePriceFeed.RedstonePriceFeedContract;
@@ -1,9 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_onchain_utils_AddressMap = require("../../utils/AddressMap.js");
3
3
  const require_onchain_utils_bytes32ToString = require("../../utils/bytes32ToString.js");
4
- const require_onchain_constants_address_provider = require("../../constants/address-provider.js");
5
- const require_onchain_constants_versions = require("../../constants/versions.js");
6
- require("../../constants/index.js");
7
4
  require("../../utils/index.js");
8
5
  const require_onchain_base_SDKConstruct = require("../../base/SDKConstruct.js");
9
6
  const require_onchain_base_token_types = require("../../base/token-types.js");
@@ -15,6 +12,7 @@ const require_onchain_market_rwa_securitize_SecuritizeRWAFactory = require("./se
15
12
  require("./securitize/index.js");
16
13
  let viem = require("viem");
17
14
  //#region src/onchain/market/rwa/RWARegistry.ts
15
+ const RWA_COMPRESSOR_ADDRESS = "0x9Bff226505632930BA1897E7943e90A2f7D0D9f7";
18
16
  /**
19
17
  * Registry of RWA underlying tokens and RWA factory contracts.
20
18
  *
@@ -42,11 +40,10 @@ var RWARegistry = class extends require_onchain_base_SDKConstruct.SDKConstruct {
42
40
  getLoadMulticalls(configurators, rwaFactories = []) {
43
41
  this.#requestedFactories = rwaFactories;
44
42
  if (!rwaFactories.length) return [];
45
- const [rwaCompressorAddress] = this.sdk.addressProvider.mustGetLatest(require_onchain_constants_address_provider.AP_RWA_COMPRESSOR, require_onchain_constants_versions.VERSION_RANGE_310);
46
43
  return [{
47
44
  call: {
48
45
  abi: require_abi_rwa_iRWACompressor.iRWACompressorAbi,
49
- address: rwaCompressorAddress,
46
+ address: RWA_COMPRESSOR_ADDRESS,
50
47
  functionName: "getRWAMarketsData",
51
48
  args: [configurators, rwaFactories]
52
49
  },
@@ -84,10 +81,9 @@ var RWARegistry = class extends require_onchain_base_SDKConstruct.SDKConstruct {
84
81
  let factories = this.#factories.values();
85
82
  if (factories_?.length) factories = factories_.map((f) => this.#factories.mustGet(f));
86
83
  if (!factories.length) return [];
87
- const [rwaCompressorAddress] = this.sdk.addressProvider.mustGetLatest(require_onchain_constants_address_provider.AP_RWA_COMPRESSOR, require_onchain_constants_versions.VERSION_RANGE_310);
88
84
  const resp = await this.client.readContract({
89
85
  abi: require_abi_rwa_iRWACompressor.iRWACompressorAbi,
90
- address: rwaCompressorAddress,
86
+ address: RWA_COMPRESSOR_ADDRESS,
91
87
  functionName: "getRWAInvestorData",
92
88
  args: [investor, factories.map((f) => f.address)],
93
89
  blockNumber
@@ -286,3 +282,4 @@ var RWARegistry = class extends require_onchain_base_SDKConstruct.SDKConstruct {
286
282
  };
287
283
  //#endregion
288
284
  exports.RWARegistry = RWARegistry;
285
+ exports.RWA_COMPRESSOR_ADDRESS = RWA_COMPRESSOR_ADDRESS;
@@ -17,6 +17,7 @@ exports.MidasLiquidatorContract = require_onchain_market_rwa_midas_MidasLiquidat
17
17
  exports.PHANTOM_TOKEN_MIDAS_REDEMPTION = require_onchain_market_rwa_midas_constants.PHANTOM_TOKEN_MIDAS_REDEMPTION;
18
18
  exports.PHANTOM_TOKEN_SECURITIZE_REDEMPTION = require_onchain_market_rwa_securitize_constants.PHANTOM_TOKEN_SECURITIZE_REDEMPTION;
19
19
  exports.RWARegistry = require_onchain_market_rwa_RWARegistry.RWARegistry;
20
+ exports.RWA_COMPRESSOR_ADDRESS = require_onchain_market_rwa_RWARegistry.RWA_COMPRESSOR_ADDRESS;
20
21
  exports.RWA_LIQUIDATOR_MIDAS = require_onchain_market_rwa_midas_constants.RWA_LIQUIDATOR_MIDAS;
21
22
  exports.RWA_LIQUIDATOR_SECURITIZE = require_onchain_market_rwa_securitize_constants.RWA_LIQUIDATOR_SECURITIZE;
22
23
  exports.SecuritizeDegenNFT = require_onchain_market_rwa_securitize_SecuritizeDegenNFT.SecuritizeDegenNFT;
@@ -1,5 +1,5 @@
1
- import { iCreditFacadeV310Abi } from "../abi/310/generated.js";
2
1
  import { ierc20Abi } from "../abi/iERC20.js";
2
+ import { iCreditFacadeV310Abi } from "../abi/310/generated.js";
3
3
  import { AddressMap } from "../onchain/utils/AddressMap.js";
4
4
  import { AddressSet } from "../onchain/utils/AddressSet.js";
5
5
  import { AssetsMap } from "../onchain/utils/AssetsMap.js";
@@ -1,6 +1,6 @@
1
+ import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
1
2
  import { getNetworkType } from "../onchain/chain/chains.js";
2
3
  import { getWithdrawalCompressorAddress } from "../onchain/accounts/withdrawal-compressor/addresses.js";
3
- import { iWithdrawalCompressorV313Abi } from "../abi/IWithdrawalCompressorV313.js";
4
4
  import "../onchain/index.js";
5
5
  import { iMidasDataFeedAbi, iMidasRedemptionVaultAbi, midasGatewayAbi, midasRedeemerAbi, midasRedemptionVaultPhantomTokenAbi, securitizeRedeemerAbi, securitizeRedemptionGatewayAbi, securitizeRedemptionPhantomTokenAbi } from "./withdrawalAbi.js";
6
6
  import { erc20Abi, hexToString, parseAbi, parseEther } from "viem";
@@ -1,5 +1,5 @@
1
- import { iCreditFacadeV310Abi } from "../../abi/310/generated.js";
2
1
  import { ierc20Abi } from "../../abi/iERC20.js";
2
+ import { iCreditFacadeV310Abi } from "../../abi/310/generated.js";
3
3
  import { AddressMap } from "../../onchain/utils/AddressMap.js";
4
4
  import "../../onchain/index.js";
5
5
  import { UnexpectedFacadeEventOrderError } from "./errors.js";
@@ -1,3 +1,5 @@
1
+ import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
2
+ import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
1
3
  import { AP_REWARDS_COMPRESSOR } from "../constants/address-provider.js";
2
4
  import { ADDRESS_0X0 } from "../constants/addresses.js";
3
5
  import { MAX_UINT256 } from "../constants/math.js";
@@ -8,14 +10,11 @@ import "../base/index.js";
8
10
  import { AccountBotsService } from "./bots/AccountBotsService.js";
9
11
  import "./bots/index.js";
10
12
  import { rewardsCompressorAbi } from "../../abi/compressors/rewardsCompressor.js";
11
- import { iBaseRewardPoolAbi } from "../../abi/iBaseRewardPool.js";
12
- import { ierc4626AdapterAbi } from "../../abi/ierc4626Adapter.js";
13
13
  import { expectedBalanceDeltas } from "../market/credit/expectedBalanceDeltas.js";
14
14
  import "../market/index.js";
15
15
  import { CreditAccountCompressor } from "./credit-account-compressor/CreditAccountCompressor.js";
16
16
  import "./credit-account-compressor/index.js";
17
17
  import { extractPriceUpdates, extractQuotaTokens, mergePriceUpdates } from "./multicall-utils.js";
18
- import { prependMidasReceiveGreenlist } from "./utils/midasUtils.js";
19
18
  import { encodeFunctionData } from "viem";
20
19
  //#region src/onchain/accounts/CreditAccountsServiceV310.ts
21
20
  /**
@@ -212,7 +211,7 @@ var CreditAccountsServiceV310 = class extends SDKConstruct {
212
211
  }),
213
212
  ...callsAfter ?? []
214
213
  ];
215
- calls = await this.#prependMidasReceiveGreenlist(cm.address, calls);
214
+ calls = [...await cmSuite.openingCalls(), ...calls];
216
215
  calls = await this.prependPriceUpdates(cm.address, calls);
217
216
  const tx = reopenCreditAccount ? cmSuite.multicallTx(reopenCreditAccount, calls, rwaOptions) : cmSuite.openCreditAccountTx(to, calls, referralCode, rwaOptions);
218
217
  tx.value = ethAmount.toString(10);
@@ -439,18 +438,6 @@ var CreditAccountsServiceV310 = class extends SDKConstruct {
439
438
  return this.sdk.addressProvider.mustGetLatest(AP_REWARDS_COMPRESSOR, VERSION_RANGE_310)[0];
440
439
  }
441
440
  /**
442
- * {@inheritDoc ICreditAccountsService.prependMidasReceiveGreenlist}
443
- */
444
- async #prependMidasReceiveGreenlist(creditManager, calls) {
445
- const cm = this.sdk.marketRegister.findCreditManager(creditManager);
446
- return prependMidasReceiveGreenlist({
447
- cm,
448
- client: this.client,
449
- calls,
450
- logger: this.logger
451
- });
452
- }
453
- /**
454
441
  * Withdrawal compressor of the current chain.
455
442
  * @throws If no withdrawal compressor is supported on the current chain.
456
443
  **/
@@ -1,3 +1,4 @@
1
+ import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
1
2
  import { AddressSet } from "../../utils/AddressSet.js";
2
3
  import { bytes32ToString } from "../../utils/bytes32ToString.js";
3
4
  import { ADDRESS_0X0 } from "../../constants/addresses.js";
@@ -19,7 +20,6 @@ import { SecuritizeLiquidatorContract } from "../../market/rwa/securitize/Securi
19
20
  import "../../market/rwa/securitize/index.js";
20
21
  import "../../market/index.js";
21
22
  import { LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./constants.js";
22
- import { iLiquidationCompressorV313Abi } from "../../../abi/ILiquidationCompressorV313.js";
23
23
  import { skipLiquidatableAccount } from "./skipLiquidatableAccount.js";
24
24
  //#region src/onchain/accounts/liquidations/LiquidationsService.ts
25
25
  /**
@@ -1,9 +1,9 @@
1
+ import { iRedemptionLoggerV310Abi } from "../../../abi/iRedemptionLoggerV310.js";
1
2
  import { BaseContract } from "../../base/BaseContract.js";
2
3
  import "../../base/index.js";
3
4
  import { sdkErr, sdkOk } from "../../../model/result.js";
4
5
  import "../../../model/index.js";
5
6
  import { decodeDelayedIntent } from "./intent-codec.js";
6
- import { iRedemptionLoggerV310Abi } from "../../../abi/iRedemptionLoggerV310.js";
7
7
  //#region src/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.ts
8
8
  const abi = iRedemptionLoggerV310Abi;
9
9
  /**
@@ -1,5 +1,5 @@
1
- import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
2
1
  import { iWithdrawalCompressorV310Abi } from "../../../abi/IWithdrawalCompressorV310.js";
2
+ import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
3
3
  //#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.ts
4
4
  const abi = iWithdrawalCompressorV310Abi;
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
2
1
  import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
2
+ import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
3
3
  //#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.ts
4
4
  const abi = iWithdrawalCompressorV311Abi;
5
5
  /**
@@ -1,6 +1,6 @@
1
+ import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
1
2
  import { encodeDelayedIntent } from "./intent-codec.js";
2
3
  import { AbstractWithdrawalCompressorContract, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./AbstractWithdrawalCompressorContract.js";
3
- import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
4
4
  import { toWithdrawalStatus } from "./types.js";
5
5
  //#region src/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.ts
6
6
  const abi = iWithdrawalCompressorV313Abi;
@@ -1,12 +1,12 @@
1
+ import { iExpirableAbi } from "../../abi/iExpirable.js";
2
+ import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
3
+ import { iVersionAbi } from "../../abi/iVersion.js";
1
4
  import { AddressMap } from "../utils/AddressMap.js";
2
5
  import { AddressSet } from "../utils/AddressSet.js";
3
6
  import { bytes32ToString } from "../utils/bytes32ToString.js";
4
7
  import { getAssetType } from "../chain/chains.js";
5
8
  import { formatBN } from "../utils/formatter.js";
6
9
  import "../utils/index.js";
7
- import { iExpirableAbi } from "../../abi/iExpirable.js";
8
- import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
9
- import { iVersionAbi } from "../../abi/iVersion.js";
10
10
  import { SdkRWADataNotLoadedError } from "../core/errors.js";
11
11
  import { executeMulticallBatches } from "../utils/viem/executeMulticallBatches.js";
12
12
  //#region src/onchain/base/TokensMeta.ts
@@ -32,7 +32,6 @@ const AP_WETH_GATEWAY = "WETH_GATEWAY";
32
32
  const AP_WETH_TOKEN = "WETH_TOKEN";
33
33
  const AP_ZAPPER_REGISTER = "ZAPPER_REGISTER";
34
34
  const AP_ZERO_PRICE_FEED = "ZERO_PRICE_FEED";
35
- const AP_RWA_COMPRESSOR = "GLOBAL::RWA_COMPRESSOR";
36
35
  const AP_REDEMPTION_LOGGER = "LOCAL::REDEMPTION_LOGGER";
37
36
  /**
38
37
  * Default address provider address for v3.1.0
@@ -40,4 +39,4 @@ const AP_REDEMPTION_LOGGER = "LOCAL::REDEMPTION_LOGGER";
40
39
  */
41
40
  const ADDRESS_PROVIDER_V310 = "0xF7f0a609BfAb9a0A98786951ef10e5FE26cC1E38";
42
41
  //#endregion
43
- export { ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, NO_VERSION };
42
+ export { ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, NO_VERSION };
@@ -1,8 +1,8 @@
1
- import { ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, NO_VERSION } from "./address-provider.js";
1
+ import { ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, NO_VERSION } from "./address-provider.js";
2
2
  import { ADDRESS_0X0, MULTICALL_ADDRESS, NATIVE_ADDRESS, NOT_DEPLOYED } from "./addresses.js";
3
3
  import { BotPermissions, botPermissionsToString } from "./bot-permissions.js";
4
4
  import { DUST_THRESHOLD, LEVERAGE_DECIMALS, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PRICE_DECIMALS, PRICE_DECIMALS_POW, RAY, RAY_DECIMALS_POW, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, WAD, WAD_DECIMALS_POW, halfRAY, isZeroBalance } from "./math.js";
5
5
  import { BLOCKS_PER_WEEK_BY_NETWORK, RAMP_DURATION_BY_NETWORK } from "./networks.js";
6
6
  import { PERIPHERY_CONTRACTS } from "./periphery.js";
7
7
  import { VERSION_RANGE_310, isV310, isVersionRange } from "./versions.js";
8
- export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, BLOCKS_PER_WEEK_BY_NETWORK, BotPermissions, DUST_THRESHOLD, LEVERAGE_DECIMALS, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PRICE_DECIMALS, PRICE_DECIMALS_POW, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, VERSION_RANGE_310, WAD, WAD_DECIMALS_POW, botPermissionsToString, halfRAY, isV310, isVersionRange, isZeroBalance };
8
+ export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, BLOCKS_PER_WEEK_BY_NETWORK, BotPermissions, DUST_THRESHOLD, LEVERAGE_DECIMALS, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PRICE_DECIMALS, PRICE_DECIMALS_POW, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, VERSION_RANGE_310, WAD, WAD_DECIMALS_POW, botPermissionsToString, halfRAY, isV310, isVersionRange, isZeroBalance };
@@ -1,8 +1,8 @@
1
+ import { iVersionAbi } from "../../abi/iVersion.js";
1
2
  import "../constants/address-provider.js";
2
3
  import { isV310 } from "../constants/versions.js";
3
4
  import "../constants/index.js";
4
5
  import { hexEq } from "../utils/hex.js";
5
- import { iVersionAbi } from "../../abi/iVersion.js";
6
6
  import { AddressProviderV310Contract } from "./AddressProviderV310Contract.js";
7
7
  //#region src/onchain/core/createAddressProvider.ts
8
8
  const OVERRIDE_ADDRESSES = {};
@@ -11,7 +11,7 @@ import { NetworkType, SUPPORTED_NETWORKS, chains, findCuratorMarketConfigurator,
11
11
  import { detectNetwork } from "./chain/detectNetwork.js";
12
12
  import "./chain/index.js";
13
13
  import { etherscanApiUrl, etherscanUrl } from "./utils/etherscan.js";
14
- import { ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, NO_VERSION } from "./constants/address-provider.js";
14
+ import { ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, NO_VERSION } from "./constants/address-provider.js";
15
15
  import { ADDRESS_0X0, MULTICALL_ADDRESS, NATIVE_ADDRESS, NOT_DEPLOYED } from "./constants/addresses.js";
16
16
  import { BotPermissions, botPermissionsToString } from "./constants/bot-permissions.js";
17
17
  import { DUST_THRESHOLD, LEVERAGE_DECIMALS, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PRICE_DECIMALS, PRICE_DECIMALS_POW, RAY, RAY_DECIMALS_POW, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, WAD, WAD_DECIMALS_POW, halfRAY, isZeroBalance } from "./constants/math.js";
@@ -188,7 +188,7 @@ import { MidasLiquidatorContract } from "./market/rwa/midas/MidasLiquidatorContr
188
188
  import { SecuritizeDegenNFT } from "./market/rwa/securitize/SecuritizeDegenNFT.js";
189
189
  import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.js";
190
190
  import { SecuritizeRWAFactory } from "./market/rwa/securitize/SecuritizeRWAFactory.js";
191
- import { RWARegistry } from "./market/rwa/RWARegistry.js";
191
+ import { RWARegistry, RWA_COMPRESSOR_ADDRESS } from "./market/rwa/RWARegistry.js";
192
192
  import { isRWAFactory } from "./market/rwa/types.js";
193
193
  import "./market/index.js";
194
194
  import { CreditAccountCompressorV310Contract } from "./accounts/credit-account-compressor/CreditAccountCompressorV310Contract.js";
@@ -301,4 +301,4 @@ import { replayMulticall } from "./preview/preview/replayMulticall.js";
301
301
  import { previewOperation } from "./preview/preview/previewOperation.js";
302
302
  import "./preview/index.js";
303
303
  import "./types/index.js";
304
- export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountMigratorAdapterContract, AdapterType, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BigIntMath, BotPermissions, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainContractsRegister, ChainNotConfiguredError, CompositePriceFeedContract, Construct, ContractParseError, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountOperationsService, CreditAccountState, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DUST_THRESHOLD, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, MultichainConstruct, MultichainLiquidationsService, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, OpportunitiesService, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PositionsService, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeDegenNFT, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, SimulateWithPriceUpdatesError, SimulationError, StakingRewardsAdapterContract, TokensMeta, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TypedObjectUtils, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VERSION_RANGE_310, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, botPermissionsToString, bpsToRay, buildDelayedStrategyPositionOperationPreview, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkMidasAccountGreenlist, checkObtained, checkOperation, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaCount, checkQuotaLimit, checkRWAOpenRequirements, checkRWAOpening, checkReservePriceLimited, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, childLogger, classifyCloseOrRepay, classifyCurveOperation, classifyInnerOperations, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectDelayedClaim, detectDelayedOperation, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateClaimableAt, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isCloseOrRepay, isDust, isLPPriceFeed, isPhantomToken, isPoolOperation, isPublicNetwork, isRWAFactory, isRWAOperation, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, makeReplayState, mellowDvvAdapterAbi, midasGreenlistsAccount, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parsePosNegAmount, parseRWAFactoryOperationCalldata, percentFmt, pickStrategyTargetCollateral, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, raise, rayToBps, rayToNumber, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
304
+ export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AccountMigratorAdapterContract, AdapterType, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BigIntMath, BotPermissions, BoundedPriceFeedContract, CamelotV3AdapterContract, ChainContractsRegister, ChainNotConfiguredError, CompositePriceFeedContract, Construct, ContractParseError, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountOperationsService, CreditAccountState, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DUST_THRESHOLD, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, EXECUTE_BYTES_SELECTOR, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_HEALTH_FACTOR_FACADE, MIN_HEALTH_FACTOR_FORM, MIN_HF_LIMITED, MIN_INT96, MIN_SAFE_HEALTH_FACTOR_FORM, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, MissingSerializedParamsError, MultichainConstruct, MultichainLiquidationsService, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, OpportunitiesService, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PeripheryCompressorV310Contract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PositionsService, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkRWADataNotLoadedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeDegenNFT, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, SimulateWithPriceUpdatesError, SimulationError, StakingRewardsAdapterContract, TokensMeta, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TypedObjectUtils, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VERSION_RANGE_310, VelodromeV2RouterAdapterContract, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, amountOf, assetsMap, attachOptionsSchema, botPermissionsToString, bpsToRay, buildDelayedStrategyPositionOperationPreview, bytes32ToString, calcBorrowApy, calcBorrowRate, calcDefaultQuota, calcEffectiveBorrowApy, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcQuotaUpdate, calcRecommendedQuota, calcTimeToLiquidationMs, calcUtilization, calcUtilizationRaw, chains, checkAccountQuotas, checkBorrowLimit, checkCollateralFunding, checkCollateralised, checkCreditAccountFrozen, checkCreditManagerPaused, checkCreditOperation, checkDebtLimits, checkEmergencyLiquidator, checkForbiddenToken, checkHealthFactors, checkIncreaseDebt, checkIncreaseQuota, checkLeverage, checkLiquidation, checkLiquidationEligibility, checkLiquidationFunding, checkLiquidatorEligible, checkMarket, checkMarketExpired, checkMidasAccountGreenlist, checkObtained, checkOperation, checkPoolFunding, checkPoolLiquidity, checkPoolOperation, checkPoolPaused, checkPoolSunset, checkQuotaCount, checkQuotaLimit, checkRWAOpenRequirements, checkRWAOpening, checkReservePriceLimited, checkSimulation, checkWallet, checkWalletAllowance, checkWalletBalance, childLogger, classifyCloseOrRepay, classifyCurveOperation, classifyInnerOperations, collateralPriceInUnderlying, collectTraces, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, decodeDelayedIntent, detectDelayedClaim, detectDelayedOperation, detectNetwork, dominantCollateral, encodeDelayedIntent, erc4626ReferralAdapterAbi, estimateClaimableAt, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCallTo, findCallWithInput, findCuratorMarketConfigurator, findExecuteBytes, fmtBinaryMask, fnSigToName, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAccountTargetCollateral, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getLegacyStrategyTarget, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hasAdapterDeployParamsAbi, healthFactorBps, hexEq, hydrateAddressProvider, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCreditAccountAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isCloseOrRepay, isDust, isLPPriceFeed, isPhantomToken, isPoolOperation, isPublicNetwork, isRWAFactory, isRWAOperation, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, isZeroBalance, iwstETHAbi, iwstEthv1AdapterAbi, json_parse, json_stringify, lidoV1_WETHGatewayAbi, makeReplayState, mellowDvvAdapterAbi, midasGreenlistsAccount, minSeizedAmount, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, parseAdapterAction, parseAdapterDeployParams, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parsePosNegAmount, parseRWAFactoryOperationCalldata, percentFmt, pickStrategyTargetCollateral, previewAdjustStrategyPosition, previewExitOrRepayStrategyPosition, previewOperation, raise, rayToBps, rayToNumber, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent, resolveProtocolCall, retry, rewardsFromTransfers, roundUpQuota, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, soleNonUnderlyingCollateral, strategyName, swapFromTransfers, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toNetTransfers, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toToken, toTokenAmount, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
@@ -65,7 +65,7 @@ const adapterConstructorAbi = {
65
65
  ["INFINIFI_UNWINDING"]: { 310: PHANTOM_TOKEN_ADAPTER_ABI },
66
66
  ["SECURITIZE_REDEMPTION"]: {
67
67
  310: PHANTOM_TOKEN_ADAPTER_ABI,
68
- 311: BASIC_ADAPTER_ABI
68
+ 311: PHANTOM_TOKEN_ADAPTER_ABI
69
69
  },
70
70
  ["STAKING_REWARDS"]: { 312: STAKING_REWARDS_ADAPTER_ABI },
71
71
  ["MIDAS_ISSUANCE_VAULT"]: {
@@ -128,6 +128,12 @@ var AbstractAdapterContract = class extends BaseContract {
128
128
  return false;
129
129
  }
130
130
  /**
131
+ * {@inheritDoc IAdapterContract.openingCalls}
132
+ */
133
+ async openingCalls() {
134
+ return [];
135
+ }
136
+ /**
131
137
  * Applies the balance changes of a decoded adapter call to the running
132
138
  * balances, mutating them in place. Overrides should express changes via
133
139
  * {@link setLeftover} (diff-style calls) and {@link spendExact}
@@ -1,5 +1,5 @@
1
- import { AbstractAdapterContract } from "./AbstractAdapter.js";
2
1
  import { accountMigratorAbi } from "../../../../abi/AccountMigrator.js";
2
+ import { AbstractAdapterContract } from "./AbstractAdapter.js";
3
3
  //#region src/onchain/market/adapters/contracts/AccountMigratorAdapterContract.ts
4
4
  const abi = accountMigratorAbi;
5
5
  const protocolAbi = accountMigratorAbi;
@@ -1,6 +1,6 @@
1
+ import { ierc4626AdapterAbi } from "../../../../abi/ierc4626Adapter.js";
1
2
  import { MissingSerializedParamsError } from "../../../base/errors.js";
2
3
  import "../../../base/index.js";
3
- import { ierc4626AdapterAbi } from "../../../../abi/ierc4626Adapter.js";
4
4
  import { iERC4626Abi } from "../abi/targetContractAbi.js";
5
5
  import { fnSigToName, swapFromTransfers } from "../transferHelpers.js";
6
6
  import { AbstractAdapterContract } from "./AbstractAdapter.js";