@gearbox-protocol/sdk 14.12.0-next.54 → 14.12.0-next.56

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 (71) hide show
  1. package/dist/cjs/abi/iPhantomToken.js +19 -0
  2. package/dist/cjs/abi/rwa/iMidasLiquidatorV311.js +96 -0
  3. package/dist/cjs/abi/rwa/iRWAGateway.js +19 -0
  4. package/dist/cjs/abi/rwa/iSecuritizeLiquidatorV311.js +111 -0
  5. package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +65 -0
  6. package/dist/cjs/sdk/accounts/liquidations/MultichainLiquidationsService.js +10 -0
  7. package/dist/cjs/sdk/base/BaseContract.js +26 -0
  8. package/dist/cjs/sdk/base/ChainContractsRegister.js +24 -0
  9. package/dist/cjs/sdk/base/token-types.js +1 -0
  10. package/dist/cjs/sdk/index.js +14 -1
  11. package/dist/cjs/sdk/market/credit/CreditFacadeV310BaseContract.js +3 -3
  12. package/dist/cjs/sdk/market/index.js +9 -0
  13. package/dist/cjs/sdk/market/rwa/index.js +10 -0
  14. package/dist/cjs/sdk/market/rwa/midas/MidasLiquidatorContract.js +43 -0
  15. package/dist/cjs/sdk/market/rwa/midas/constants.js +7 -0
  16. package/dist/cjs/sdk/market/rwa/midas/index.js +6 -0
  17. package/dist/cjs/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.js +31 -0
  18. package/dist/cjs/sdk/market/rwa/securitize/constants.js +4 -0
  19. package/dist/cjs/sdk/market/rwa/securitize/index.js +4 -0
  20. package/dist/cjs/sdk/utils/viem/cast.js +20 -15
  21. package/dist/cjs/sdk/utils/viem/index.js +4 -0
  22. package/dist/cjs/sdk/utils/viem/simulateCall.js +82 -0
  23. package/dist/esm/abi/iPhantomToken.js +18 -0
  24. package/dist/esm/abi/rwa/iMidasLiquidatorV311.js +95 -0
  25. package/dist/esm/abi/rwa/iRWAGateway.js +18 -0
  26. package/dist/esm/abi/rwa/iSecuritizeLiquidatorV311.js +110 -0
  27. package/dist/esm/permissionless/bindings/factory/credit-factory.js +1 -1
  28. package/dist/esm/preview/index.js +5 -5
  29. package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +65 -0
  30. package/dist/esm/sdk/accounts/liquidations/MultichainLiquidationsService.js +10 -0
  31. package/dist/esm/sdk/base/BaseContract.js +26 -0
  32. package/dist/esm/sdk/base/ChainContractsRegister.js +24 -0
  33. package/dist/esm/sdk/base/token-types.js +1 -0
  34. package/dist/esm/sdk/index.js +7 -3
  35. package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +3 -3
  36. package/dist/esm/sdk/market/index.js +5 -2
  37. package/dist/esm/sdk/market/rwa/index.js +6 -2
  38. package/dist/esm/sdk/market/rwa/midas/MidasLiquidatorContract.js +43 -0
  39. package/dist/esm/sdk/market/rwa/midas/constants.js +5 -0
  40. package/dist/esm/sdk/market/rwa/midas/index.js +3 -0
  41. package/dist/esm/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.js +31 -0
  42. package/dist/esm/sdk/market/rwa/securitize/constants.js +3 -1
  43. package/dist/esm/sdk/market/rwa/securitize/index.js +3 -2
  44. package/dist/esm/sdk/utils/viem/cast.js +20 -16
  45. package/dist/esm/sdk/utils/viem/index.js +3 -2
  46. package/dist/esm/sdk/utils/viem/simulateCall.js +80 -0
  47. package/dist/types/abi/iPhantomToken.d.ts +18 -0
  48. package/dist/types/abi/rwa/iMidasLiquidatorV311.d.ts +83 -0
  49. package/dist/types/abi/rwa/iRWAGateway.d.ts +18 -0
  50. package/dist/types/abi/rwa/iSecuritizeLiquidatorV311.d.ts +95 -0
  51. package/dist/types/sdk/accounts/index.d.ts +2 -2
  52. package/dist/types/sdk/accounts/liquidations/LiquidationsService.d.ts +4 -0
  53. package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +5 -1
  54. package/dist/types/sdk/accounts/liquidations/index.d.ts +2 -2
  55. package/dist/types/sdk/accounts/liquidations/types.d.ts +13 -1
  56. package/dist/types/sdk/base/BaseContract.d.ts +13 -0
  57. package/dist/types/sdk/base/ChainContractsRegister.d.ts +15 -0
  58. package/dist/types/sdk/base/token-types.d.ts +1 -1
  59. package/dist/types/sdk/index.d.ts +8 -4
  60. package/dist/types/sdk/market/index.d.ts +5 -2
  61. package/dist/types/sdk/market/rwa/index.d.ts +6 -2
  62. package/dist/types/sdk/market/rwa/midas/MidasLiquidatorContract.d.ts +93 -0
  63. package/dist/types/sdk/market/rwa/midas/constants.d.ts +5 -0
  64. package/dist/types/sdk/market/rwa/midas/index.d.ts +3 -0
  65. package/dist/types/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.d.ts +104 -0
  66. package/dist/types/sdk/market/rwa/securitize/constants.d.ts +3 -1
  67. package/dist/types/sdk/market/rwa/securitize/index.d.ts +3 -2
  68. package/dist/types/sdk/utils/viem/cast.d.ts +6 -1
  69. package/dist/types/sdk/utils/viem/index.d.ts +3 -2
  70. package/dist/types/sdk/utils/viem/simulateCall.d.ts +57 -0
  71. package/package.json +1 -1
@@ -27,6 +27,8 @@ import { retry } from "./utils/retry.js";
27
27
  import { toAddress } from "./utils/toAddress.js";
28
28
  import { ZodAddress } from "./utils/zod.js";
29
29
  import "./utils/index.js";
30
+ import { generateCastTraceCall, getCastTraceArgs } from "./utils/viem/cast.js";
31
+ import { SimulationError, simulateCall } from "./utils/viem/simulateCall.js";
30
32
  import { TokensMeta } from "./base/TokensMeta.js";
31
33
  import { ChainContractsRegister } from "./base/ChainContractsRegister.js";
32
34
  import { Construct } from "./base/Construct.js";
@@ -44,7 +46,6 @@ import { CreditFacadeV310BaseContract, creditFacadeV310Abi as abi } from "./mark
44
46
  import { CreditFacadeV310Contract } from "./market/credit/CreditFacadeV310Contract.js";
45
47
  import { CreditManagerV310Contract } from "./market/credit/CreditManagerV310Contract.js";
46
48
  import { CreditSuite } from "./market/credit/CreditSuite.js";
47
- import { generateCastTraceCall } from "./utils/viem/cast.js";
48
49
  import { simulateMulticall } from "./utils/viem/simulateMulticall.js";
49
50
  import { SimulateWithPriceUpdatesError, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./utils/viem/simulateWithPriceUpdates.js";
50
51
  import { executeDelegatedMulticalls } from "./utils/viem/executeDelegatedMulticalls.js";
@@ -88,7 +89,10 @@ import { IERC20ZapperContract } from "./market/zapper/IERC20ZapperContract.js";
88
89
  import { IETHZapperContract } from "./market/zapper/IETHZapperContract.js";
89
90
  import { createZapper } from "./market/zapper/createZapper.js";
90
91
  import { MarketRegister } from "./market/MarketRegister.js";
91
- import { RWA_FACTORY_SECURITIZE } from "./market/rwa/securitize/constants.js";
92
+ import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
93
+ import { MidasLiquidatorContract } from "./market/rwa/midas/MidasLiquidatorContract.js";
94
+ import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
95
+ import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.js";
92
96
  import { SECURITIZE_REGISTER_VAULT_TYPES } from "./market/rwa/securitize/types.js";
93
97
  import { SecuritizeRWAFactory } from "./market/rwa/securitize/SecuritizeRWAFactory.js";
94
98
  import { RWARegistry } from "./market/rwa/RWARegistry.js";
@@ -127,4 +131,4 @@ import { OnchainSDK, STATE_VERSION } from "./OnchainSDK.js";
127
131
  import { MultichainSDK } from "./MultichainSDK.js";
128
132
  import { attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
129
133
  import "./types/index.js";
130
- 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, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BotPermissions, BoundedPriceFeedContract, ChainContractsRegister, CompositePriceFeedContract, Construct, ContractParseError, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InvalidDelayedIntentError, LEVERAGE_DECIMALS, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MissingSerializedParamsError, MultichainLiquidationsService, MultichainSDK, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderContract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeRWAFactory, SimulateWithPriceUpdatesError, TokensMeta, TypedObjectUtils, UnsupportedZapperFunctionError, VERSION_RANGE_310, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, assetsMap, attachOptionsSchema, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, decodeDelayedIntent, detectNetwork, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, numberWithCommas, onchainSDKOptionsSchema, percentFmt, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, watchBlocksAsync };
134
+ 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, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BotPermissions, BoundedPriceFeedContract, ChainContractsRegister, CompositePriceFeedContract, Construct, ContractParseError, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InvalidDelayedIntentError, LEVERAGE_DECIMALS, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, MissingSerializedParamsError, MultichainLiquidationsService, MultichainSDK, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, 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, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderContract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, 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, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeLiquidatorContract, SecuritizeRWAFactory, SimulateWithPriceUpdatesError, SimulationError, TokensMeta, TypedObjectUtils, UnsupportedZapperFunctionError, VERSION_RANGE_310, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, assetsMap, attachOptionsSchema, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, decodeDelayedIntent, detectNetwork, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, numberWithCommas, onchainSDKOptionsSchema, percentFmt, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, watchBlocksAsync };
@@ -60,20 +60,20 @@ var CreditFacadeV310BaseContract = class extends BaseContract {
60
60
  const [onBehalfOf, calls, referralCode] = params.args;
61
61
  return [
62
62
  this.labelAddress(onBehalfOf),
63
- this.register.parseMultiCall([...calls]).join(","),
63
+ this.register.stringifyMultiCall([...calls]).join(", "),
64
64
  `${referralCode}`
65
65
  ];
66
66
  }
67
67
  case "closeCreditAccount": {
68
68
  const [creditAccount, calls] = params.args;
69
- return [this.labelAddress(creditAccount), this.register.parseMultiCall([...calls]).join(",")];
69
+ return [this.labelAddress(creditAccount), this.register.stringifyMultiCall([...calls]).join(", ")];
70
70
  }
71
71
  case "liquidateCreditAccount": {
72
72
  const [creditAccount, to, calls] = params.args;
73
73
  return [
74
74
  this.labelAddress(creditAccount),
75
75
  this.labelAddress(to),
76
- this.register.parseMultiCall([...calls]).join(",")
76
+ this.register.stringifyMultiCall([...calls]).join(", ")
77
77
  ];
78
78
  }
79
79
  default: return super.stringifyFunctionParams(params);
@@ -48,11 +48,14 @@ import { IETHZapperContract } from "./zapper/IETHZapperContract.js";
48
48
  import { createZapper } from "./zapper/createZapper.js";
49
49
  import "./zapper/index.js";
50
50
  import { MarketRegister } from "./MarketRegister.js";
51
- import { RWA_FACTORY_SECURITIZE } from "./rwa/securitize/constants.js";
51
+ import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./rwa/midas/constants.js";
52
+ import { MidasLiquidatorContract } from "./rwa/midas/MidasLiquidatorContract.js";
53
+ import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./rwa/securitize/constants.js";
54
+ import { SecuritizeLiquidatorContract } from "./rwa/securitize/SecuritizeLiquidatorContract.js";
52
55
  import { SECURITIZE_REGISTER_VAULT_TYPES } from "./rwa/securitize/types.js";
53
56
  import { SecuritizeRWAFactory } from "./rwa/securitize/SecuritizeRWAFactory.js";
54
57
  import { RWARegistry } from "./rwa/RWARegistry.js";
55
58
  import { RWA_FACTORY_TYPES, isRWAFactory } from "./rwa/types.js";
56
59
  import "./rwa/index.js";
57
60
  import "./types.js";
58
- export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, LinearInterestRateModelContract, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeRWAFactory, UnsupportedZapperFunctionError, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, fetchPythPayloads, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed };
61
+ export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, LinearInterestRateModelContract, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeRWAFactory, UnsupportedZapperFunctionError, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, fetchPythPayloads, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed };
@@ -1,7 +1,11 @@
1
- import { RWA_FACTORY_SECURITIZE } from "./securitize/constants.js";
1
+ import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./midas/constants.js";
2
+ import { MidasLiquidatorContract } from "./midas/MidasLiquidatorContract.js";
3
+ import "./midas/index.js";
4
+ import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./securitize/constants.js";
5
+ import { SecuritizeLiquidatorContract } from "./securitize/SecuritizeLiquidatorContract.js";
2
6
  import { SECURITIZE_REGISTER_VAULT_TYPES } from "./securitize/types.js";
3
7
  import { SecuritizeRWAFactory } from "./securitize/SecuritizeRWAFactory.js";
4
8
  import "./securitize/index.js";
5
9
  import { RWARegistry } from "./RWARegistry.js";
6
10
  import { RWA_FACTORY_TYPES, isRWAFactory } from "./types.js";
7
- export { RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeRWAFactory, isRWAFactory };
11
+ export { MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeRWAFactory, isRWAFactory };
@@ -0,0 +1,43 @@
1
+ import { BaseContract } from "../../../base/BaseContract.js";
2
+ import "../../../base/index.js";
3
+ import { RWA_LIQUIDATOR_MIDAS } from "./constants.js";
4
+ import { iMidasLiquidatorV311Abi } from "../../../../abi/rwa/iMidasLiquidatorV311.js";
5
+ //#region src/sdk/market/rwa/midas/MidasLiquidatorContract.ts
6
+ const abi = iMidasLiquidatorV311Abi;
7
+ var MidasLiquidatorContract = class extends BaseContract {
8
+ constructor(options, address) {
9
+ super(options, {
10
+ addr: address,
11
+ contractType: RWA_LIQUIDATOR_MIDAS,
12
+ version: 311,
13
+ name: "MidasLiquidator",
14
+ abi
15
+ });
16
+ }
17
+ stringifyFunctionParams(params) {
18
+ if (params.functionName === "liquidateWithRedeemerTransfers") {
19
+ const [creditAccount, gateway, calls, lossPolicyData] = params.args;
20
+ return [
21
+ this.labelAddress(creditAccount),
22
+ this.labelAddress(gateway),
23
+ `[${this.register.stringifyMultiCall([...calls]).join(", ")}]`,
24
+ lossPolicyData === "0x" ? "none" : lossPolicyData
25
+ ];
26
+ }
27
+ return super.stringifyFunctionParams(params);
28
+ }
29
+ parseFunctionParamsV2(params, strict) {
30
+ if (params.functionName === "liquidateWithRedeemerTransfers") {
31
+ const [creditAccount, gateway, calls, lossPolicyData] = params.args;
32
+ return {
33
+ creditAccount,
34
+ gateway,
35
+ calls: this.register.parseMultiCallV2([...calls], strict),
36
+ lossPolicyData
37
+ };
38
+ }
39
+ return super.parseFunctionParamsV2(params, strict);
40
+ }
41
+ };
42
+ //#endregion
43
+ export { MidasLiquidatorContract };
@@ -0,0 +1,5 @@
1
+ //#region src/sdk/market/rwa/midas/constants.ts
2
+ const RWA_LIQUIDATOR_MIDAS = "RWA_LIQUIDATOR::MIDAS";
3
+ const PHANTOM_TOKEN_MIDAS_REDEMPTION = "PHANTOM_TOKEN::MIDAS_REDEMPTION";
4
+ //#endregion
5
+ export { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS };
@@ -0,0 +1,3 @@
1
+ import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./constants.js";
2
+ import { MidasLiquidatorContract } from "./MidasLiquidatorContract.js";
3
+ export { MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS };
@@ -0,0 +1,31 @@
1
+ import { BaseContract } from "../../../base/BaseContract.js";
2
+ import "../../../base/index.js";
3
+ import { RWA_LIQUIDATOR_SECURITIZE } from "./constants.js";
4
+ import { iSecuritizeLiquidatorV311Abi } from "../../../../abi/rwa/iSecuritizeLiquidatorV311.js";
5
+ //#region src/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.ts
6
+ const abi = iSecuritizeLiquidatorV311Abi;
7
+ var SecuritizeLiquidatorContract = class extends BaseContract {
8
+ constructor(options, address) {
9
+ super(options, {
10
+ addr: address,
11
+ contractType: RWA_LIQUIDATOR_SECURITIZE,
12
+ version: 311,
13
+ name: "SecuritizeLiquidator",
14
+ abi
15
+ });
16
+ }
17
+ stringifyFunctionParams(params) {
18
+ if (params.functionName === "liquidatePendingRedemption") {
19
+ const [creditAccount, redemptionGateway, priceUpdates, lossPolicyData] = params.args;
20
+ return [
21
+ this.labelAddress(creditAccount),
22
+ this.labelAddress(redemptionGateway),
23
+ `${priceUpdates.length} price updates`,
24
+ lossPolicyData === "0x" ? "none" : lossPolicyData
25
+ ];
26
+ }
27
+ return super.stringifyFunctionParams(params);
28
+ }
29
+ };
30
+ //#endregion
31
+ export { SecuritizeLiquidatorContract };
@@ -1,4 +1,6 @@
1
1
  //#region src/sdk/market/rwa/securitize/constants.ts
2
2
  const RWA_FACTORY_SECURITIZE = "RWA_FACTORY::SECURITIZE";
3
+ const RWA_LIQUIDATOR_SECURITIZE = "RWA_LIQUIDATOR::SECURITIZE";
4
+ const PHANTOM_TOKEN_SECURITIZE_REDEMPTION = "PHANTOM_TOKEN::SECURITIZE_RD";
3
5
  //#endregion
4
- export { RWA_FACTORY_SECURITIZE };
6
+ export { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE };
@@ -1,4 +1,5 @@
1
- import { RWA_FACTORY_SECURITIZE } from "./constants.js";
1
+ import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./constants.js";
2
+ import { SecuritizeLiquidatorContract } from "./SecuritizeLiquidatorContract.js";
2
3
  import { SECURITIZE_REGISTER_VAULT_TYPES } from "./types.js";
3
4
  import { SecuritizeRWAFactory } from "./SecuritizeRWAFactory.js";
4
- export { RWA_FACTORY_SECURITIZE, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeRWAFactory };
5
+ export { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeRWAFactory };
@@ -1,22 +1,26 @@
1
1
  //#region src/sdk/utils/viem/cast.ts
2
- function generateCastTraceCall(params, rpcUrl) {
3
- const { to, data, blockNumber, gas, gasPrice, maxPriorityFeePerGas, value } = params;
4
- const cmd = [
5
- "cast",
6
- "call",
7
- "--trace"
8
- ];
9
- if (rpcUrl) cmd.push("--rpc-url", rpcUrl);
10
- if (blockNumber) cmd.push("--block", blockNumber.toString());
11
- if (gas) cmd.push("--gas-limit", gas.toString());
12
- if (gasPrice) cmd.push("--gas-price", gasPrice.toString());
13
- if (maxPriorityFeePerGas) cmd.push("priority-gas-price", maxPriorityFeePerGas.toString());
14
- if (value) cmd.push("--value", value.toString());
2
+ /**
3
+ * Builds the argument list of a `cast call --trace` command reproducing the call,
4
+ * without the leading `cast` binary, so that it can be spawned directly.
5
+ */
6
+ function getCastTraceArgs(params, rpcUrl) {
7
+ const { to, data, account, blockNumber, gas, gasPrice, maxPriorityFeePerGas, value } = params;
8
+ const args = ["call", "--trace"];
9
+ if (rpcUrl) args.push("--rpc-url", rpcUrl);
10
+ if (account) args.push("--from", typeof account === "string" ? account : account.address);
11
+ if (blockNumber) args.push("--block", blockNumber.toString());
12
+ if (gas) args.push("--gas-limit", gas.toString());
13
+ if (gasPrice) args.push("--gas-price", gasPrice.toString());
14
+ if (maxPriorityFeePerGas) args.push("--priority-gas-price", maxPriorityFeePerGas.toString());
15
+ if (value) args.push("--value", value.toString());
15
16
  return [
16
- ...cmd,
17
+ ...args,
17
18
  to,
18
19
  data
19
- ].join(" ");
20
+ ].filter(Boolean);
21
+ }
22
+ function generateCastTraceCall(params, rpcUrl) {
23
+ return ["cast", ...getCastTraceArgs(params, rpcUrl)].join(" ");
20
24
  }
21
25
  //#endregion
22
- export { generateCastTraceCall };
26
+ export { generateCastTraceCall, getCastTraceArgs };
@@ -1,7 +1,8 @@
1
- import { generateCastTraceCall } from "./cast.js";
1
+ import { generateCastTraceCall, getCastTraceArgs } from "./cast.js";
2
+ import { SimulationError, simulateCall } from "./simulateCall.js";
2
3
  import { simulateMulticall } from "./simulateMulticall.js";
3
4
  import { SimulateWithPriceUpdatesError, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./simulateWithPriceUpdates.js";
4
5
  import { executeDelegatedMulticalls } from "./executeDelegatedMulticalls.js";
5
6
  import { estimateRawTxGas, sendRawTx } from "./sendRawTx.js";
6
7
  import { watchBlocksAsync } from "./watchBlocksAsync.js";
7
- export { SimulateWithPriceUpdatesError, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getSimulateWithPriceUpdatesError, sendRawTx, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
8
+ export { SimulateWithPriceUpdatesError, SimulationError, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getCastTraceArgs, getSimulateWithPriceUpdatesError, sendRawTx, simulateCall, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
@@ -0,0 +1,80 @@
1
+ import { generateCastTraceCall, getCastTraceArgs } from "./cast.js";
2
+ import { BaseError, decodeFunctionData, getContractError } from "viem";
3
+ import { getAction, parseAccount } from "viem/utils";
4
+ import { call } from "viem/actions";
5
+ //#region src/sdk/utils/viem/simulateCall.ts
6
+ /**
7
+ * Simulates raw calldata with `eth_call`, without encoding or decoding anything on success.
8
+ *
9
+ * Use it when calldata already exists (for example a {@link RawTx} built by the SDK): the happy
10
+ * path is a pure passthrough, and the calldata is only decoded when the call reverts, to build a
11
+ * viem {@link ContractFunctionExecutionError} out of the revert data.
12
+ *
13
+ * @param client - viem client to call with.
14
+ * @param parameters - viem call parameters, plus the ABIs used for error decoding.
15
+ * @throws {@link SimulationError} when the call reverts or the request fails.
16
+ */
17
+ async function simulateCall(client, parameters) {
18
+ const { abis = [], account: account_, ...rest } = parameters;
19
+ const request = {
20
+ ...rest,
21
+ account: account_ ? parseAccount(account_) : client.account
22
+ };
23
+ try {
24
+ const { data } = await getAction(client, call, "call")(request);
25
+ return { data: data ?? "0x" };
26
+ } catch (e) {
27
+ throw new SimulationError(e, request, abis.flat());
28
+ }
29
+ }
30
+ /**
31
+ * Thrown by {@link simulateCall} when a simulation fails.
32
+ *
33
+ * The viem {@link ContractFunctionExecutionError} built from the revert data is kept as `cause`,
34
+ * so `walk()` still finds `ContractFunctionRevertedError` and its decoded (or raw) revert data.
35
+ */
36
+ var SimulationError = class extends BaseError {
37
+ /**
38
+ * The call that failed, kept verbatim so that it can be replayed or traced.
39
+ */
40
+ request;
41
+ constructor(cause, request, abi) {
42
+ const callData = request.data ?? "0x";
43
+ let functionName = callData.slice(0, 10);
44
+ let args = [];
45
+ try {
46
+ const decoded = decodeFunctionData({
47
+ abi,
48
+ data: callData
49
+ });
50
+ functionName = decoded.functionName;
51
+ args = decoded.args ?? [];
52
+ } catch {}
53
+ const account = request.account;
54
+ super(`simulation of ${functionName} at ${request.to} failed`, {
55
+ cause: getContractError(cause, {
56
+ abi,
57
+ address: request.to ?? void 0,
58
+ args,
59
+ functionName,
60
+ sender: typeof account === "string" ? account : account?.address ?? void 0
61
+ }),
62
+ name: "SimulationError"
63
+ });
64
+ this.request = request;
65
+ }
66
+ /**
67
+ * Arguments of a `cast call --trace` command replaying this call, for spawning `cast` directly.
68
+ */
69
+ getCastTraceArgs(rpcUrl) {
70
+ return getCastTraceArgs(this.request, rpcUrl);
71
+ }
72
+ /**
73
+ * Full `cast call --trace` command replaying this call.
74
+ */
75
+ getCastTraceCall(rpcUrl) {
76
+ return generateCastTraceCall(this.request, rpcUrl);
77
+ }
78
+ };
79
+ //#endregion
80
+ export { SimulationError, simulateCall };
@@ -0,0 +1,18 @@
1
+ //#region src/abi/iPhantomToken.d.ts
2
+ declare const iPhantomTokenAbi: readonly [{
3
+ readonly type: "function";
4
+ readonly inputs: readonly [];
5
+ readonly name: "getPhantomTokenInfo";
6
+ readonly outputs: readonly [{
7
+ readonly name: "target";
8
+ readonly internalType: "address";
9
+ readonly type: "address";
10
+ }, {
11
+ readonly name: "depositedToken";
12
+ readonly internalType: "address";
13
+ readonly type: "address";
14
+ }];
15
+ readonly stateMutability: "view";
16
+ }];
17
+ //#endregion
18
+ export { iPhantomTokenAbi };
@@ -0,0 +1,83 @@
1
+ //#region src/abi/rwa/iMidasLiquidatorV311.d.ts
2
+ declare const iMidasLiquidatorV311Abi: readonly [{
3
+ readonly type: "function";
4
+ readonly name: "contractType";
5
+ readonly inputs: readonly [];
6
+ readonly outputs: readonly [{
7
+ readonly name: "";
8
+ readonly type: "bytes32";
9
+ readonly internalType: "bytes32";
10
+ }];
11
+ readonly stateMutability: "view";
12
+ }, {
13
+ readonly type: "function";
14
+ readonly name: "isTransferAllowed";
15
+ readonly inputs: readonly [{
16
+ readonly name: "redeemerOwner";
17
+ readonly type: "address";
18
+ readonly internalType: "address";
19
+ }];
20
+ readonly outputs: readonly [{
21
+ readonly name: "";
22
+ readonly type: "bool";
23
+ readonly internalType: "bool";
24
+ }];
25
+ readonly stateMutability: "view";
26
+ }, {
27
+ readonly type: "function";
28
+ readonly name: "liquidateWithRedeemerTransfers";
29
+ readonly inputs: readonly [{
30
+ readonly name: "creditAccount";
31
+ readonly type: "address";
32
+ readonly internalType: "address";
33
+ }, {
34
+ readonly name: "gateway";
35
+ readonly type: "address";
36
+ readonly internalType: "address";
37
+ }, {
38
+ readonly name: "calls";
39
+ readonly type: "tuple[]";
40
+ readonly internalType: "struct MultiCall[]";
41
+ readonly components: readonly [{
42
+ readonly name: "target";
43
+ readonly type: "address";
44
+ readonly internalType: "address";
45
+ }, {
46
+ readonly name: "callData";
47
+ readonly type: "bytes";
48
+ readonly internalType: "bytes";
49
+ }];
50
+ }, {
51
+ readonly name: "lossPolicyData";
52
+ readonly type: "bytes";
53
+ readonly internalType: "bytes";
54
+ }];
55
+ readonly outputs: readonly [];
56
+ readonly stateMutability: "nonpayable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly name: "transferableRedeemerOwner";
60
+ readonly inputs: readonly [];
61
+ readonly outputs: readonly [{
62
+ readonly name: "";
63
+ readonly type: "address";
64
+ readonly internalType: "address";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ }, {
68
+ readonly type: "function";
69
+ readonly name: "version";
70
+ readonly inputs: readonly [];
71
+ readonly outputs: readonly [{
72
+ readonly name: "";
73
+ readonly type: "uint256";
74
+ readonly internalType: "uint256";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ }, {
78
+ readonly type: "error";
79
+ readonly name: "NotValidGatewayException";
80
+ readonly inputs: readonly [];
81
+ }];
82
+ //#endregion
83
+ export { iMidasLiquidatorV311Abi };
@@ -0,0 +1,18 @@
1
+ //#region src/abi/rwa/iRWAGateway.d.ts
2
+ /**
3
+ * Minimal ABI shared by RWA delayed-withdrawal gateways (Midas, Securitize).
4
+ * Only holds `transferMaster`, which is the gateway's dedicated liquidator.
5
+ */
6
+ declare const iRWAGatewayAbi: readonly [{
7
+ readonly type: "function";
8
+ readonly inputs: readonly [];
9
+ readonly name: "transferMaster";
10
+ readonly outputs: readonly [{
11
+ readonly name: "";
12
+ readonly internalType: "address";
13
+ readonly type: "address";
14
+ }];
15
+ readonly stateMutability: "view";
16
+ }];
17
+ //#endregion
18
+ export { iRWAGatewayAbi };
@@ -0,0 +1,95 @@
1
+ //#region src/abi/rwa/iSecuritizeLiquidatorV311.d.ts
2
+ declare const iSecuritizeLiquidatorV311Abi: readonly [{
3
+ readonly type: "function";
4
+ readonly name: "contractType";
5
+ readonly inputs: readonly [];
6
+ readonly outputs: readonly [{
7
+ readonly name: "";
8
+ readonly type: "bytes32";
9
+ readonly internalType: "bytes32";
10
+ }];
11
+ readonly stateMutability: "view";
12
+ }, {
13
+ readonly type: "function";
14
+ readonly name: "isTransferAllowed";
15
+ readonly inputs: readonly [{
16
+ readonly name: "redeemerOwner";
17
+ readonly type: "address";
18
+ readonly internalType: "address";
19
+ }];
20
+ readonly outputs: readonly [{
21
+ readonly name: "";
22
+ readonly type: "bool";
23
+ readonly internalType: "bool";
24
+ }];
25
+ readonly stateMutability: "view";
26
+ }, {
27
+ readonly type: "function";
28
+ readonly name: "liquidatePendingRedemption";
29
+ readonly inputs: readonly [{
30
+ readonly name: "creditAccount";
31
+ readonly type: "address";
32
+ readonly internalType: "address";
33
+ }, {
34
+ readonly name: "redemptionGateway";
35
+ readonly type: "address";
36
+ readonly internalType: "address";
37
+ }, {
38
+ readonly name: "priceUpdates";
39
+ readonly type: "tuple[]";
40
+ readonly internalType: "struct PriceUpdate[]";
41
+ readonly components: readonly [{
42
+ readonly name: "priceFeed";
43
+ readonly type: "address";
44
+ readonly internalType: "address";
45
+ }, {
46
+ readonly name: "data";
47
+ readonly type: "bytes";
48
+ readonly internalType: "bytes";
49
+ }];
50
+ }, {
51
+ readonly name: "lossPolicyData";
52
+ readonly type: "bytes";
53
+ readonly internalType: "bytes";
54
+ }];
55
+ readonly outputs: readonly [];
56
+ readonly stateMutability: "nonpayable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly name: "transferableRedeemerOwner";
60
+ readonly inputs: readonly [];
61
+ readonly outputs: readonly [{
62
+ readonly name: "";
63
+ readonly type: "address";
64
+ readonly internalType: "address";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ }, {
68
+ readonly type: "function";
69
+ readonly name: "version";
70
+ readonly inputs: readonly [];
71
+ readonly outputs: readonly [{
72
+ readonly name: "";
73
+ readonly type: "uint256";
74
+ readonly internalType: "uint256";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ }, {
78
+ readonly type: "error";
79
+ readonly name: "AccountHasSufficientLiquidityException";
80
+ readonly inputs: readonly [];
81
+ }, {
82
+ readonly type: "error";
83
+ readonly name: "NotValidGatewayException";
84
+ readonly inputs: readonly [];
85
+ }, {
86
+ readonly type: "error";
87
+ readonly name: "StableCoinIsNotConvertibleException";
88
+ readonly inputs: readonly [];
89
+ }, {
90
+ readonly type: "error";
91
+ readonly name: "UnknownCreditAccountException";
92
+ readonly inputs: readonly [];
93
+ }];
94
+ //#endregion
95
+ export { iSecuritizeLiquidatorV311Abi };
@@ -13,8 +13,8 @@ import "./withdrawal-compressor/index.js";
13
13
  import { AccountToCheck, AddCollateralProps, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ChangeDeptProps, ClaimDelayedProps, ClaimFarmRewardsProps, CloseCreditAccountProps, CloseCreditAccountResult, CloseOptions, CreditAccountFilter, CreditAccountOperationResult, CreditAccountTokensSlice, CreditManagerFilter, CreditManagerOperationResult, DefaultPartialLiquidationParams, EncodableCreditAccountOperation, ExecuteSwapProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, RepayAndLiquidateCreditAccountProps, RepayCreditAccountProps, Rewards, SetBotProps, StartDelayedWithdrawalProps, UpdateQuotasProps, WithdrawCollateralProps } from "./types.js";
14
14
  import { CreditAccountServiceOptions, CreditAccountsServiceV310 } from "./CreditAccountsServiceV310.js";
15
15
  import { LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./liquidations/constants.js";
16
- import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain } from "./liquidations/types.js";
16
+ import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, LoadRWALiquidatorsProps, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain } from "./liquidations/types.js";
17
17
  import { LiquidationsService } from "./liquidations/LiquidationsService.js";
18
18
  import { MultichainLiquidationsService } from "./liquidations/MultichainLiquidationsService.js";
19
19
  import "./liquidations/index.js";
20
- export { AbstractWithdrawalCompressorContract, AccountToCheck, AddCollateralProps, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, ChangeDeptProps, ClaimDelayedProps, ClaimFarmRewardsProps, ClaimableWithdrawal, CloseCreditAccountProps, CloseCreditAccountResult, CloseOptions, CreditAccountFilter, CreditAccountOperationResult, CreditAccountServiceOptions, CreditAccountTokensSlice, CreditAccountsServiceV310, CreditManagerFilter, CreditManagerOperationResult, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DefaultPartialLiquidationParams, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedReceivedAsset, DelayedWithdrawCollateralIntent, EncodableCreditAccountOperation, ExecuteSwapProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, ICreditAccountsService, ILiquidationsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, InstantReceivedAsset, InvalidDelayedIntentError, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidationsService, LiquidatorWithdrawal, MultichainLiquidationsService, MultichainNetworkProps, MultichainNetworksProps, OnchainRequestableWithdrawal, OpenCAProps, PartiallyLiquidateProps, PendingWithdrawal, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, ReceivedAsset, RedemptionLog, RedemptionLoggerV310Contract, RepayAndLiquidateCreditAccountProps, RepayCreditAccountProps, RequestableWithdrawal, Rewards, SetBotProps, StartDelayedWithdrawalProps, UpdateQuotasProps, WithMultichain, WithdrawCollateralProps, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, getWithdrawalCompressorAddress, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
20
+ export { AbstractWithdrawalCompressorContract, AccountToCheck, AddCollateralProps, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, ChangeDeptProps, ClaimDelayedProps, ClaimFarmRewardsProps, ClaimableWithdrawal, CloseCreditAccountProps, CloseCreditAccountResult, CloseOptions, CreditAccountFilter, CreditAccountOperationResult, CreditAccountServiceOptions, CreditAccountTokensSlice, CreditAccountsServiceV310, CreditManagerFilter, CreditManagerOperationResult, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DefaultPartialLiquidationParams, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedReceivedAsset, DelayedWithdrawCollateralIntent, EncodableCreditAccountOperation, ExecuteSwapProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, ICreditAccountsService, ILiquidationsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, InstantReceivedAsset, InvalidDelayedIntentError, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidationsService, LiquidatorWithdrawal, LoadRWALiquidatorsProps, MultichainLiquidationsService, MultichainNetworkProps, MultichainNetworksProps, OnchainRequestableWithdrawal, OpenCAProps, PartiallyLiquidateProps, PendingWithdrawal, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, ReceivedAsset, RedemptionLog, RedemptionLoggerV310Contract, RepayAndLiquidateCreditAccountProps, RepayCreditAccountProps, RequestableWithdrawal, Rewards, SetBotProps, StartDelayedWithdrawalProps, UpdateQuotasProps, WithMultichain, WithdrawCollateralProps, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, getWithdrawalCompressorAddress, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
@@ -29,6 +29,10 @@ declare class LiquidationsService extends SDKConstruct implements ILiquidationsS
29
29
  * {@inheritDoc ILiquidationsService.getLiquidatorWithdrawals}
30
30
  **/
31
31
  getLiquidatorWithdrawals(props: GetLiquidatorWithdrawalsProps): Promise<LiquidatorWithdrawal[]>;
32
+ /**
33
+ * {@inheritDoc ILiquidationsService.loadRWALiquidators}
34
+ **/
35
+ loadRWALiquidators(): Promise<void>;
32
36
  }
33
37
  //#endregion
34
38
  export { LiquidationsService };
@@ -2,7 +2,7 @@ import { PluginsMap } from "../../plugins/types.js";
2
2
  import "../../plugins/index.js";
3
3
  import { RawTx } from "../../types/transactions.js";
4
4
  import "../../types/index.js";
5
- import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidatorWithdrawalsProps, ILiquidationsService, LiquidatableAccount, LiquidationDetails, LiquidatorWithdrawal } from "./types.js";
5
+ import { BuildLiquidationTxProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidatorWithdrawalsProps, ILiquidationsService, LiquidatableAccount, LiquidationDetails, LiquidatorWithdrawal, LoadRWALiquidatorsProps } from "./types.js";
6
6
  import { MultichainSDK } from "../../MultichainSDK.js";
7
7
  //#region src/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts
8
8
  /**
@@ -32,6 +32,10 @@ declare class MultichainLiquidationsService<const Plugins extends PluginsMap = {
32
32
  * {@inheritDoc ILiquidationsService.getLiquidatorWithdrawals}
33
33
  **/
34
34
  getLiquidatorWithdrawals(props: GetLiquidatorWithdrawalsProps<true>): Promise<LiquidatorWithdrawal[]>;
35
+ /**
36
+ * {@inheritDoc ILiquidationsService.loadRWALiquidators}
37
+ **/
38
+ loadRWALiquidators(props?: LoadRWALiquidatorsProps<true>): Promise<void>;
35
39
  }
36
40
  //#endregion
37
41
  export { MultichainLiquidationsService };