@gearbox-protocol/sdk 13.0.0-next.29 → 13.0.0-next.30
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.
- package/dist/cjs/abi/310/iSecuritizeDegenNFT.js +263 -0
- package/dist/cjs/abi/310/iSecuritizeKYCFactory.js +9 -87
- package/dist/cjs/history/assembleOperations.js +103 -0
- package/dist/cjs/history/classifyMulticallOperations.js +157 -0
- package/dist/cjs/history/errors.js +91 -0
- package/dist/cjs/history/extractProtocolCalls.js +53 -0
- package/dist/cjs/history/extractTransfers.js +168 -0
- package/dist/cjs/history/findFacadeCalls.js +84 -0
- package/dist/cjs/history/index.js +39 -0
- package/dist/cjs/history/inner-operations.js +16 -0
- package/dist/cjs/history/internal-types.js +16 -0
- package/dist/cjs/history/mapOperations.js +79 -0
- package/dist/cjs/history/package.json +1 -0
- package/dist/cjs/history/parseCreditAccountTransaction.js +86 -0
- package/dist/cjs/history/populateContractsRegister.js +68 -0
- package/dist/cjs/history/toLegacyOperation.js +182 -0
- package/dist/cjs/{plugins/adapters/contracts/YearnV2AdapterContract.js → history/trace-utils.js} +36 -21
- package/dist/cjs/history/types.js +16 -0
- package/dist/cjs/plugins/adapters/AdaptersPlugin.js +13 -106
- package/dist/cjs/plugins/adapters/abi/index.js +2 -0
- package/dist/cjs/plugins/adapters/abi/targetContractAbi.js +5168 -0
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +102 -3
- package/dist/cjs/plugins/adapters/contracts/AccountMigratorAdapterContract.js +8 -1
- package/dist/cjs/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +40 -30
- package/dist/cjs/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +21 -11
- package/dist/cjs/plugins/adapters/contracts/CamelotV3AdapterContract.js +31 -21
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +91 -25
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +63 -25
- package/dist/cjs/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +68 -31
- package/dist/cjs/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +68 -31
- package/dist/cjs/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +73 -31
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterDeposit.js +80 -33
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +62 -26
- package/dist/cjs/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +80 -34
- package/dist/cjs/plugins/adapters/contracts/DaiUsdsAdapterContract.js +39 -14
- package/dist/cjs/plugins/adapters/contracts/ERC4626AdapterContract.js +55 -27
- package/dist/cjs/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +39 -14
- package/dist/cjs/plugins/adapters/contracts/FluidDexAdapterContract.js +27 -14
- package/dist/cjs/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +45 -23
- package/dist/cjs/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +23 -14
- package/dist/cjs/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +22 -12
- package/dist/cjs/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +26 -16
- package/dist/cjs/plugins/adapters/contracts/LidoV1AdapterContract.js +39 -17
- package/dist/cjs/plugins/adapters/contracts/MellowClaimerAdapterContract.js +21 -11
- package/dist/cjs/plugins/adapters/contracts/MellowDVVAdapterContract.js +38 -14
- package/dist/cjs/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +71 -42
- package/dist/cjs/plugins/adapters/contracts/MellowWrapperAdapterContract.js +21 -11
- package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +36 -17
- package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +38 -21
- package/dist/cjs/plugins/adapters/contracts/PendleRouterAdapterContract.js +63 -53
- package/dist/cjs/plugins/adapters/contracts/StakingRewardsAdapterContract.js +62 -37
- package/dist/cjs/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +35 -25
- package/dist/cjs/plugins/adapters/contracts/UniswapV2AdapterContract.js +35 -21
- package/dist/cjs/plugins/adapters/contracts/UniswapV3AdapterContract.js +32 -23
- package/dist/cjs/plugins/adapters/contracts/UniswapV4AdapterContract.js +41 -27
- package/dist/cjs/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +34 -17
- package/dist/cjs/plugins/adapters/contracts/VelodromeV2AdapterContract.js +35 -25
- package/dist/cjs/plugins/adapters/contracts/WstETHV1AdapterContract.js +31 -11
- package/dist/cjs/plugins/adapters/contracts/deprecated/BalancerV2VaultAdapterContract.js +585 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/EqualizerRouterAdapterContract.js +262 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/InfraredVaultAdapterContract.js +296 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/KodiakIslandGatewayAdapterContract.js +415 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/MellowDepositQueueAdapterContract.js +74 -0
- package/dist/cjs/plugins/adapters/contracts/{MellowRedeemQueueAdapterContract.js → deprecated/MellowRedeemQueueAdapterContract.js} +33 -14
- package/dist/cjs/plugins/adapters/contracts/deprecated/MellowVaultAdapterContract.js +233 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/YearnV2AdapterContract.js +359 -0
- package/dist/cjs/plugins/adapters/contracts/deprecated/index.js +36 -0
- package/dist/cjs/plugins/adapters/contracts/index.js +3 -17
- package/dist/cjs/plugins/adapters/contracts/types.js +0 -9
- package/dist/cjs/plugins/adapters/createAdapter.js +140 -0
- package/dist/cjs/plugins/adapters/index.js +6 -0
- package/dist/cjs/plugins/adapters/legacyAdapterOperations.js +16 -0
- package/dist/cjs/plugins/adapters/transferHelpers.js +127 -0
- package/dist/cjs/sdk/base/BaseContract.js +54 -3
- package/dist/cjs/sdk/base/ChainContractsRegister.js +33 -0
- package/dist/cjs/sdk/base/Construct.js +11 -3
- package/dist/cjs/sdk/base/PlaceholderContract.js +2 -2
- package/dist/cjs/sdk/base/errors.js +35 -0
- package/dist/cjs/sdk/base/index.js +2 -0
- package/dist/cjs/sdk/market/adapters/PlaceholderAdapterContracts.js +10 -4
- package/dist/cjs/sdk/market/adapters/{factory.js → createAdapter.js} +3 -3
- package/dist/cjs/sdk/market/adapters/index.js +2 -2
- package/dist/cjs/sdk/market/credit/CreditFacadeV310BaseContract.js +108 -0
- package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +3 -40
- package/dist/cjs/sdk/market/credit/index.js +2 -0
- package/dist/cjs/sdk/market/pool/SecuritizeKYCFactory.js +14 -1
- package/dist/cjs/sdk/utils/abi-decode.js +43 -2
- package/dist/esm/abi/310/iSecuritizeDegenNFT.js +239 -0
- package/dist/esm/abi/310/iSecuritizeKYCFactory.js +9 -87
- package/dist/esm/history/assembleOperations.js +79 -0
- package/dist/esm/history/classifyMulticallOperations.js +137 -0
- package/dist/esm/history/errors.js +62 -0
- package/dist/esm/history/extractProtocolCalls.js +32 -0
- package/dist/esm/history/extractTransfers.js +148 -0
- package/dist/esm/history/findFacadeCalls.js +63 -0
- package/dist/esm/history/index.js +9 -0
- package/dist/esm/history/inner-operations.js +0 -0
- package/dist/esm/history/internal-types.js +0 -0
- package/dist/esm/history/mapOperations.js +55 -0
- package/dist/esm/history/package.json +1 -0
- package/dist/esm/history/parseCreditAccountTransaction.js +62 -0
- package/dist/esm/history/populateContractsRegister.js +52 -0
- package/dist/esm/history/toLegacyOperation.js +157 -0
- package/dist/esm/history/trace-utils.js +36 -0
- package/dist/esm/history/types.js +0 -0
- package/dist/esm/plugins/adapters/AdaptersPlugin.js +14 -148
- package/dist/esm/plugins/adapters/abi/index.js +1 -0
- package/dist/esm/plugins/adapters/abi/targetContractAbi.js +5113 -0
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +111 -4
- package/dist/esm/plugins/adapters/contracts/AccountMigratorAdapterContract.js +8 -1
- package/dist/esm/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +40 -30
- package/dist/esm/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +21 -11
- package/dist/esm/plugins/adapters/contracts/CamelotV3AdapterContract.js +31 -21
- package/dist/esm/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +100 -26
- package/dist/esm/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +65 -25
- package/dist/esm/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +70 -31
- package/dist/esm/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +70 -31
- package/dist/esm/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +75 -31
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterDeposit.js +82 -33
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +64 -26
- package/dist/esm/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +85 -34
- package/dist/esm/plugins/adapters/contracts/DaiUsdsAdapterContract.js +41 -14
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +57 -27
- package/dist/esm/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +41 -14
- package/dist/esm/plugins/adapters/contracts/FluidDexAdapterContract.js +29 -14
- package/dist/esm/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +47 -23
- package/dist/esm/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +29 -15
- package/dist/esm/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +27 -12
- package/dist/esm/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +31 -16
- package/dist/esm/plugins/adapters/contracts/LidoV1AdapterContract.js +41 -17
- package/dist/esm/plugins/adapters/contracts/MellowClaimerAdapterContract.js +23 -11
- package/dist/esm/plugins/adapters/contracts/MellowDVVAdapterContract.js +40 -14
- package/dist/esm/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +74 -43
- package/dist/esm/plugins/adapters/contracts/MellowWrapperAdapterContract.js +23 -11
- package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +38 -17
- package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +44 -22
- package/dist/esm/plugins/adapters/contracts/PendleRouterAdapterContract.js +65 -53
- package/dist/esm/plugins/adapters/contracts/StakingRewardsAdapterContract.js +64 -37
- package/dist/esm/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +35 -25
- package/dist/esm/plugins/adapters/contracts/UniswapV2AdapterContract.js +36 -22
- package/dist/esm/plugins/adapters/contracts/UniswapV3AdapterContract.js +33 -24
- package/dist/esm/plugins/adapters/contracts/UniswapV4AdapterContract.js +45 -28
- package/dist/esm/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +40 -18
- package/dist/esm/plugins/adapters/contracts/VelodromeV2AdapterContract.js +35 -25
- package/dist/esm/plugins/adapters/contracts/WstETHV1AdapterContract.js +33 -11
- package/dist/esm/plugins/adapters/contracts/deprecated/BalancerV2VaultAdapterContract.js +559 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/EqualizerRouterAdapterContract.js +236 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/InfraredVaultAdapterContract.js +272 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/KodiakIslandGatewayAdapterContract.js +390 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/MellowDepositQueueAdapterContract.js +52 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/MellowRedeemQueueAdapterContract.js +45 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/MellowVaultAdapterContract.js +209 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/YearnV2AdapterContract.js +336 -0
- package/dist/esm/plugins/adapters/contracts/deprecated/index.js +8 -0
- package/dist/esm/plugins/adapters/contracts/index.js +1 -8
- package/dist/esm/plugins/adapters/contracts/types.js +0 -8
- package/dist/esm/plugins/adapters/createAdapter.js +158 -0
- package/dist/esm/plugins/adapters/index.js +3 -0
- package/dist/esm/plugins/adapters/legacyAdapterOperations.js +0 -0
- package/dist/esm/plugins/adapters/transferHelpers.js +95 -0
- package/dist/esm/sdk/base/BaseContract.js +56 -3
- package/dist/esm/sdk/base/ChainContractsRegister.js +33 -0
- package/dist/esm/sdk/base/Construct.js +11 -3
- package/dist/esm/sdk/base/PlaceholderContract.js +2 -2
- package/dist/esm/sdk/base/errors.js +11 -0
- package/dist/esm/sdk/base/index.js +1 -0
- package/dist/esm/sdk/market/adapters/PlaceholderAdapterContracts.js +14 -5
- package/dist/esm/sdk/market/adapters/index.js +1 -1
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +86 -0
- package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +3 -43
- package/dist/esm/sdk/market/credit/index.js +1 -0
- package/dist/esm/sdk/market/pool/SecuritizeKYCFactory.js +14 -1
- package/dist/esm/sdk/utils/abi-decode.js +43 -2
- package/dist/types/abi/310/iSecuritizeDegenNFT.d.ts +324 -0
- package/dist/types/abi/310/iSecuritizeKYCFactory.d.ts +12 -121
- package/dist/types/history/assembleOperations.d.ts +22 -0
- package/dist/types/history/classifyMulticallOperations.d.ts +35 -0
- package/dist/types/history/errors.d.ts +30 -0
- package/dist/types/history/extractProtocolCalls.d.ts +8 -0
- package/dist/types/history/extractTransfers.d.ts +22 -0
- package/dist/types/history/findFacadeCalls.d.ts +9 -0
- package/dist/types/history/index.d.ts +6 -0
- package/dist/types/history/inner-operations.d.ts +57 -0
- package/dist/types/history/internal-types.d.ts +47 -0
- package/dist/types/history/mapOperations.d.ts +27 -0
- package/dist/types/history/parseCreditAccountTransaction.d.ts +27 -0
- package/dist/types/history/populateContractsRegister.d.ts +19 -0
- package/dist/types/history/toLegacyOperation.d.ts +18 -0
- package/dist/types/history/trace-utils.d.ts +12 -0
- package/dist/types/history/types.d.ts +71 -0
- package/dist/types/plugins/adapters/abi/index.d.ts +1 -0
- package/dist/types/plugins/adapters/abi/targetContractAbi.d.ts +8262 -0
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +50 -8
- package/dist/types/plugins/adapters/contracts/AccountMigratorAdapterContract.d.ts +238 -4
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +113 -4
- package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +37 -4
- package/dist/types/plugins/adapters/contracts/CamelotV3AdapterContract.d.ts +210 -4
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +407 -8
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +208 -5
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +575 -11
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +1244 -10
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +1213 -11
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +60 -6
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +483 -6
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +58 -6
- package/dist/types/plugins/adapters/contracts/FluidDexAdapterContract.d.ts +123 -6
- package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +133 -8
- package/dist/types/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +155 -5
- package/dist/types/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +240 -6
- package/dist/types/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +356 -6
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +94 -7
- package/dist/types/plugins/adapters/contracts/MellowClaimerAdapterContract.d.ts +38 -5
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +479 -6
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +483 -7
- package/dist/types/plugins/adapters/contracts/MellowWrapperAdapterContract.d.ts +48 -5
- package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +42 -7
- package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +186 -7
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +1010 -5
- package/dist/types/plugins/adapters/contracts/StakingRewardsAdapterContract.d.ts +71 -8
- package/dist/types/plugins/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +123 -4
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +747 -5
- package/dist/types/plugins/adapters/contracts/UniswapV3AdapterContract.d.ts +171 -4
- package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +96 -5
- package/dist/types/plugins/adapters/contracts/UpshiftVaultAdapterContract.d.ts +74 -7
- package/dist/types/plugins/adapters/contracts/VelodromeV2AdapterContract.d.ts +109 -4
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +267 -5
- package/dist/types/plugins/adapters/contracts/deprecated/BalancerV2VaultAdapterContract.d.ts +1664 -0
- package/dist/types/plugins/adapters/contracts/deprecated/EqualizerRouterAdapterContract.d.ts +611 -0
- package/dist/types/plugins/adapters/contracts/deprecated/InfraredVaultAdapterContract.d.ts +686 -0
- package/dist/types/plugins/adapters/contracts/deprecated/KodiakIslandGatewayAdapterContract.d.ts +1270 -0
- package/dist/types/plugins/adapters/contracts/deprecated/MellowDepositQueueAdapterContract.d.ts +19 -0
- package/dist/types/plugins/adapters/contracts/deprecated/MellowRedeemQueueAdapterContract.d.ts +18 -0
- package/dist/types/plugins/adapters/contracts/deprecated/MellowVaultAdapterContract.d.ts +531 -0
- package/dist/types/plugins/adapters/contracts/deprecated/YearnV2AdapterContract.d.ts +662 -0
- package/dist/types/plugins/adapters/contracts/deprecated/index.d.ts +8 -0
- package/dist/types/plugins/adapters/contracts/index.d.ts +1 -8
- package/dist/types/plugins/adapters/contracts/types.d.ts +0 -6
- package/dist/types/plugins/adapters/createAdapter.d.ts +7 -0
- package/dist/types/plugins/adapters/index.d.ts +3 -0
- package/dist/types/plugins/adapters/legacyAdapterOperations.d.ts +200 -0
- package/dist/types/plugins/adapters/transferHelpers.d.ts +60 -0
- package/dist/types/plugins/adapters/types.d.ts +59 -1
- package/dist/types/sdk/base/BaseContract.d.ts +15 -2
- package/dist/types/sdk/base/ChainContractsRegister.d.ts +11 -1
- package/dist/types/sdk/base/Construct.d.ts +6 -3
- package/dist/types/sdk/base/PlaceholderContract.d.ts +2 -2
- package/dist/types/sdk/base/errors.d.ts +3 -0
- package/dist/types/sdk/base/index.d.ts +1 -0
- package/dist/types/sdk/base/types.d.ts +31 -0
- package/dist/types/sdk/market/adapters/PlaceholderAdapterContracts.d.ts +9 -4
- package/dist/types/sdk/market/adapters/index.d.ts +1 -1
- package/dist/types/sdk/market/credit/CreditFacadeV310BaseContract.d.ts +856 -0
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +6 -848
- package/dist/types/sdk/market/credit/index.d.ts +1 -0
- package/dist/types/sdk/market/pool/SecuritizeKYCFactory.d.ts +14 -121
- package/dist/types/sdk/utils/abi-decode.d.ts +14 -1
- package/package.json +16 -11
- package/dist/cjs/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +0 -51
- package/dist/cjs/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +0 -58
- package/dist/cjs/plugins/adapters/contracts/InfraredVaultAdapterContract.js +0 -49
- package/dist/cjs/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +0 -56
- package/dist/cjs/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +0 -51
- package/dist/cjs/plugins/adapters/contracts/MellowVaultAdapterContract.js +0 -46
- package/dist/esm/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +0 -27
- package/dist/esm/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +0 -34
- package/dist/esm/plugins/adapters/contracts/InfraredVaultAdapterContract.js +0 -25
- package/dist/esm/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +0 -32
- package/dist/esm/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +0 -27
- package/dist/esm/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.js +0 -24
- package/dist/esm/plugins/adapters/contracts/MellowVaultAdapterContract.js +0 -22
- package/dist/esm/plugins/adapters/contracts/YearnV2AdapterContract.js +0 -22
- package/dist/types/plugins/adapters/contracts/BalancerV2VaultAdapterContract.d.ts +0 -482
- package/dist/types/plugins/adapters/contracts/EqualizerRouterAdapterContract.d.ts +0 -225
- package/dist/types/plugins/adapters/contracts/InfraredVaultAdapterContract.d.ts +0 -198
- package/dist/types/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.d.ts +0 -396
- package/dist/types/plugins/adapters/contracts/MellowDepositQueueAdapterContract.d.ts +0 -13
- package/dist/types/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.d.ts +0 -12
- package/dist/types/plugins/adapters/contracts/MellowVaultAdapterContract.d.ts +0 -203
- package/dist/types/plugins/adapters/contracts/YearnV2AdapterContract.d.ts +0 -185
- /package/dist/esm/sdk/market/adapters/{factory.js → createAdapter.js} +0 -0
- /package/dist/types/sdk/market/adapters/{factory.d.ts → createAdapter.d.ts} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var iSecuritizeDegenNFT_exports = {};
|
|
20
|
+
__export(iSecuritizeDegenNFT_exports, {
|
|
21
|
+
iSecuritizeDegenNFTAbi: () => iSecuritizeDegenNFTAbi
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(iSecuritizeDegenNFT_exports);
|
|
24
|
+
const iSecuritizeDegenNFTAbi = [
|
|
25
|
+
{
|
|
26
|
+
type: "function",
|
|
27
|
+
name: "addRegistrar",
|
|
28
|
+
inputs: [{ name: "registrar", type: "address", internalType: "address" }],
|
|
29
|
+
outputs: [],
|
|
30
|
+
stateMutability: "nonpayable"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: "function",
|
|
34
|
+
name: "burn",
|
|
35
|
+
inputs: [
|
|
36
|
+
{ name: "wallet", type: "address", internalType: "address" },
|
|
37
|
+
{ name: "", type: "uint256", internalType: "uint256" }
|
|
38
|
+
],
|
|
39
|
+
outputs: [],
|
|
40
|
+
stateMutability: "nonpayable"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "function",
|
|
44
|
+
name: "contractType",
|
|
45
|
+
inputs: [],
|
|
46
|
+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
47
|
+
stateMutability: "view"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "function",
|
|
51
|
+
name: "getDSTokens",
|
|
52
|
+
inputs: [],
|
|
53
|
+
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
54
|
+
stateMutability: "view"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "function",
|
|
58
|
+
name: "getFactory",
|
|
59
|
+
inputs: [],
|
|
60
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
61
|
+
stateMutability: "view"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: "function",
|
|
65
|
+
name: "getOperators",
|
|
66
|
+
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
67
|
+
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
68
|
+
stateMutability: "view"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: "function",
|
|
72
|
+
name: "getRegisteredTokens",
|
|
73
|
+
inputs: [
|
|
74
|
+
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
75
|
+
],
|
|
76
|
+
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
77
|
+
stateMutability: "view"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "function",
|
|
81
|
+
name: "getRegistrar",
|
|
82
|
+
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
83
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
84
|
+
stateMutability: "view"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "function",
|
|
88
|
+
name: "isDSToken",
|
|
89
|
+
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
90
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
91
|
+
stateMutability: "view"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "function",
|
|
95
|
+
name: "isOperator",
|
|
96
|
+
inputs: [
|
|
97
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
98
|
+
{ name: "operator", type: "address", internalType: "address" }
|
|
99
|
+
],
|
|
100
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
101
|
+
stateMutability: "view"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "function",
|
|
105
|
+
name: "mint",
|
|
106
|
+
inputs: [{ name: "wallet", type: "address", internalType: "address" }],
|
|
107
|
+
outputs: [],
|
|
108
|
+
stateMutability: "nonpayable"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: "function",
|
|
112
|
+
name: "registerCreditAccount",
|
|
113
|
+
inputs: [
|
|
114
|
+
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
115
|
+
{ name: "tokens", type: "address[]", internalType: "address[]" }
|
|
116
|
+
],
|
|
117
|
+
outputs: [],
|
|
118
|
+
stateMutability: "nonpayable"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: "function",
|
|
122
|
+
name: "registerHelperAccount",
|
|
123
|
+
inputs: [
|
|
124
|
+
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
125
|
+
{ name: "helperAccount", type: "address", internalType: "address" },
|
|
126
|
+
{ name: "token", type: "address", internalType: "address" }
|
|
127
|
+
],
|
|
128
|
+
outputs: [],
|
|
129
|
+
stateMutability: "nonpayable"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: "function",
|
|
133
|
+
name: "serialize",
|
|
134
|
+
inputs: [],
|
|
135
|
+
outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
|
|
136
|
+
stateMutability: "view"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: "function",
|
|
140
|
+
name: "setOperatorStatus",
|
|
141
|
+
inputs: [
|
|
142
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
143
|
+
{ name: "operator", type: "address", internalType: "address" },
|
|
144
|
+
{ name: "approved", type: "bool", internalType: "bool" }
|
|
145
|
+
],
|
|
146
|
+
outputs: [],
|
|
147
|
+
stateMutability: "nonpayable"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: "function",
|
|
151
|
+
name: "version",
|
|
152
|
+
inputs: [],
|
|
153
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
154
|
+
stateMutability: "view"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: "event",
|
|
158
|
+
name: "Burn",
|
|
159
|
+
inputs: [
|
|
160
|
+
{
|
|
161
|
+
name: "wallet",
|
|
162
|
+
type: "address",
|
|
163
|
+
indexed: true,
|
|
164
|
+
internalType: "address"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
anonymous: false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: "event",
|
|
171
|
+
name: "Mint",
|
|
172
|
+
inputs: [
|
|
173
|
+
{
|
|
174
|
+
name: "wallet",
|
|
175
|
+
type: "address",
|
|
176
|
+
indexed: true,
|
|
177
|
+
internalType: "address"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
anonymous: false
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: "event",
|
|
184
|
+
name: "SetOperatorStatus",
|
|
185
|
+
inputs: [
|
|
186
|
+
{
|
|
187
|
+
name: "token",
|
|
188
|
+
type: "address",
|
|
189
|
+
indexed: true,
|
|
190
|
+
internalType: "address"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "operator",
|
|
194
|
+
type: "address",
|
|
195
|
+
indexed: true,
|
|
196
|
+
internalType: "address"
|
|
197
|
+
},
|
|
198
|
+
{ name: "approved", type: "bool", indexed: false, internalType: "bool" }
|
|
199
|
+
],
|
|
200
|
+
anonymous: false
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
type: "event",
|
|
204
|
+
name: "SetRegistrar",
|
|
205
|
+
inputs: [
|
|
206
|
+
{
|
|
207
|
+
name: "token",
|
|
208
|
+
type: "address",
|
|
209
|
+
indexed: true,
|
|
210
|
+
internalType: "address"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: "registrar",
|
|
214
|
+
type: "address",
|
|
215
|
+
indexed: true,
|
|
216
|
+
internalType: "address"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
anonymous: false
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
type: "error",
|
|
223
|
+
name: "CallerIsNotCreditFacadeException",
|
|
224
|
+
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
type: "error",
|
|
228
|
+
name: "CallerIsNotFactoryException",
|
|
229
|
+
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
type: "error",
|
|
233
|
+
name: "CallerIsNotInstanceOwnerException",
|
|
234
|
+
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
type: "error",
|
|
238
|
+
name: "CallerIsNotOperatorException",
|
|
239
|
+
inputs: [
|
|
240
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
241
|
+
{ name: "caller", type: "address", internalType: "address" }
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
type: "error",
|
|
246
|
+
name: "RegistrarNotSetForTokenException",
|
|
247
|
+
inputs: [{ name: "token", type: "address", internalType: "address" }]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
type: "error",
|
|
251
|
+
name: "UnknownTokenException",
|
|
252
|
+
inputs: [{ name: "token", type: "address", internalType: "address" }]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
type: "error",
|
|
256
|
+
name: "UnknownWalletException",
|
|
257
|
+
inputs: [{ name: "wallet", type: "address", internalType: "address" }]
|
|
258
|
+
}
|
|
259
|
+
];
|
|
260
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
261
|
+
0 && (module.exports = {
|
|
262
|
+
iSecuritizeDegenNFTAbi
|
|
263
|
+
});
|
|
@@ -22,13 +22,6 @@ __export(iSecuritizeKYCFactory_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(iSecuritizeKYCFactory_exports);
|
|
24
24
|
const iSecuritizeKYCFactoryAbi = [
|
|
25
|
-
{
|
|
26
|
-
type: "function",
|
|
27
|
-
name: "addRegistrar",
|
|
28
|
-
inputs: [{ name: "registrar", type: "address", internalType: "address" }],
|
|
29
|
-
outputs: [],
|
|
30
|
-
stateMutability: "nonpayable"
|
|
31
|
-
},
|
|
32
25
|
{
|
|
33
26
|
type: "function",
|
|
34
27
|
name: "contractType",
|
|
@@ -36,13 +29,6 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
36
29
|
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
37
30
|
stateMutability: "view"
|
|
38
31
|
},
|
|
39
|
-
{
|
|
40
|
-
type: "function",
|
|
41
|
-
name: "degenNFT",
|
|
42
|
-
inputs: [],
|
|
43
|
-
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
44
|
-
stateMutability: "view"
|
|
45
|
-
},
|
|
46
32
|
{
|
|
47
33
|
type: "function",
|
|
48
34
|
name: "getCreditAccounts",
|
|
@@ -52,33 +38,17 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
52
38
|
},
|
|
53
39
|
{
|
|
54
40
|
type: "function",
|
|
55
|
-
name: "
|
|
41
|
+
name: "getDegenNFT",
|
|
56
42
|
inputs: [],
|
|
57
|
-
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
58
|
-
stateMutability: "view"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
type: "function",
|
|
62
|
-
name: "getInvestor",
|
|
63
|
-
inputs: [
|
|
64
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
65
|
-
],
|
|
66
43
|
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
67
44
|
stateMutability: "view"
|
|
68
45
|
},
|
|
69
46
|
{
|
|
70
47
|
type: "function",
|
|
71
|
-
name: "
|
|
48
|
+
name: "getInvestor",
|
|
72
49
|
inputs: [
|
|
73
50
|
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
74
51
|
],
|
|
75
|
-
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
76
|
-
stateMutability: "view"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
type: "function",
|
|
80
|
-
name: "getRegistrar",
|
|
81
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }],
|
|
82
52
|
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
83
53
|
stateMutability: "view"
|
|
84
54
|
},
|
|
@@ -91,15 +61,6 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
91
61
|
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
92
62
|
stateMutability: "view"
|
|
93
63
|
},
|
|
94
|
-
{
|
|
95
|
-
type: "function",
|
|
96
|
-
name: "isActiveCreditAccount",
|
|
97
|
-
inputs: [
|
|
98
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
99
|
-
],
|
|
100
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
101
|
-
stateMutability: "view"
|
|
102
|
-
},
|
|
103
64
|
{
|
|
104
65
|
type: "function",
|
|
105
66
|
name: "isCreditAccount",
|
|
@@ -118,15 +79,6 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
118
79
|
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
119
80
|
stateMutability: "view"
|
|
120
81
|
},
|
|
121
|
-
{
|
|
122
|
-
type: "function",
|
|
123
|
-
name: "isInactiveCreditAccount",
|
|
124
|
-
inputs: [
|
|
125
|
-
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
126
|
-
],
|
|
127
|
-
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
128
|
-
stateMutability: "view"
|
|
129
|
-
},
|
|
130
82
|
{
|
|
131
83
|
type: "function",
|
|
132
84
|
name: "multicall",
|
|
@@ -186,6 +138,13 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
186
138
|
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
187
139
|
stateMutability: "view"
|
|
188
140
|
},
|
|
141
|
+
{
|
|
142
|
+
type: "function",
|
|
143
|
+
name: "serialize",
|
|
144
|
+
inputs: [],
|
|
145
|
+
outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
|
|
146
|
+
stateMutability: "view"
|
|
147
|
+
},
|
|
189
148
|
{
|
|
190
149
|
type: "function",
|
|
191
150
|
name: "setFrozenStatus",
|
|
@@ -277,30 +236,6 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
277
236
|
],
|
|
278
237
|
anonymous: false
|
|
279
238
|
},
|
|
280
|
-
{
|
|
281
|
-
type: "event",
|
|
282
|
-
name: "SetRegistrar",
|
|
283
|
-
inputs: [
|
|
284
|
-
{
|
|
285
|
-
name: "token",
|
|
286
|
-
type: "address",
|
|
287
|
-
indexed: true,
|
|
288
|
-
internalType: "address"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
name: "registrar",
|
|
292
|
-
type: "address",
|
|
293
|
-
indexed: true,
|
|
294
|
-
internalType: "address"
|
|
295
|
-
}
|
|
296
|
-
],
|
|
297
|
-
anonymous: false
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
type: "error",
|
|
301
|
-
name: "CallerIsNotInstanceOwnerException",
|
|
302
|
-
inputs: [{ name: "caller", type: "address", internalType: "address" }]
|
|
303
|
-
},
|
|
304
239
|
{
|
|
305
240
|
type: "error",
|
|
306
241
|
name: "CallerIsNotInvestorException",
|
|
@@ -328,11 +263,6 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
328
263
|
name: "InvalidUnderlyingTokenException",
|
|
329
264
|
inputs: [{ name: "underlying", type: "address", internalType: "address" }]
|
|
330
265
|
},
|
|
331
|
-
{
|
|
332
|
-
type: "error",
|
|
333
|
-
name: "RegistrarNotSetForTokenException",
|
|
334
|
-
inputs: [{ name: "token", type: "address", internalType: "address" }]
|
|
335
|
-
},
|
|
336
266
|
{
|
|
337
267
|
type: "error",
|
|
338
268
|
name: "UnknownCreditAccountException",
|
|
@@ -340,14 +270,6 @@ const iSecuritizeKYCFactoryAbi = [
|
|
|
340
270
|
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
341
271
|
]
|
|
342
272
|
},
|
|
343
|
-
{
|
|
344
|
-
type: "error",
|
|
345
|
-
name: "WalletCallExecutionFailedException",
|
|
346
|
-
inputs: [
|
|
347
|
-
{ name: "index", type: "uint256", internalType: "uint256" },
|
|
348
|
-
{ name: "reason", type: "bytes", internalType: "bytes" }
|
|
349
|
-
]
|
|
350
|
-
},
|
|
351
273
|
{ type: "error", name: "ZeroAddressException", inputs: [] }
|
|
352
274
|
];
|
|
353
275
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var assembleOperations_exports = {};
|
|
20
|
+
__export(assembleOperations_exports, {
|
|
21
|
+
assembleOperations: () => assembleOperations
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(assembleOperations_exports);
|
|
24
|
+
var import_adapters = require("../plugins/adapters/index.js");
|
|
25
|
+
var import_classifyMulticallOperations = require("./classifyMulticallOperations.js");
|
|
26
|
+
var import_extractProtocolCalls = require("./extractProtocolCalls.js");
|
|
27
|
+
function assembleOperations(input) {
|
|
28
|
+
const {
|
|
29
|
+
facadeCalls,
|
|
30
|
+
executeResults,
|
|
31
|
+
register,
|
|
32
|
+
underlying,
|
|
33
|
+
liquidationRemainingFunds,
|
|
34
|
+
phantomTokens,
|
|
35
|
+
strict
|
|
36
|
+
} = input;
|
|
37
|
+
let offset = 0;
|
|
38
|
+
return facadeCalls.map((fc) => {
|
|
39
|
+
if (fc.operation === "PartiallyLiquidateCreditAccount") {
|
|
40
|
+
return assemblePartialLiquidation(fc);
|
|
41
|
+
}
|
|
42
|
+
const count = countAdapterCalls(fc.innerCalls, register);
|
|
43
|
+
const sliced = executeResults.slice(offset, offset + count);
|
|
44
|
+
offset += count;
|
|
45
|
+
const protocolCalldatas = (0, import_extractProtocolCalls.extractProtocolCalls)(fc.trace, sliced);
|
|
46
|
+
const multicall = (0, import_classifyMulticallOperations.classifyMulticallOperations)({
|
|
47
|
+
innerCalls: fc.innerCalls,
|
|
48
|
+
executeResults: sliced,
|
|
49
|
+
protocolCalldatas,
|
|
50
|
+
register,
|
|
51
|
+
creditAccount: fc.creditAccount,
|
|
52
|
+
underlying,
|
|
53
|
+
strict,
|
|
54
|
+
phantomTokens
|
|
55
|
+
});
|
|
56
|
+
switch (fc.operation) {
|
|
57
|
+
case "OpenCreditAccount":
|
|
58
|
+
return {
|
|
59
|
+
operation: fc.operation,
|
|
60
|
+
creditAccount: fc.creditAccount,
|
|
61
|
+
onBehalfOf: fc.parsed.rawArgs.onBehalfOf,
|
|
62
|
+
referralCode: fc.parsed.rawArgs.referralCode,
|
|
63
|
+
multicall
|
|
64
|
+
};
|
|
65
|
+
case "LiquidateCreditAccount":
|
|
66
|
+
return {
|
|
67
|
+
operation: fc.operation,
|
|
68
|
+
creditAccount: fc.creditAccount,
|
|
69
|
+
to: fc.parsed.rawArgs.to,
|
|
70
|
+
token: underlying,
|
|
71
|
+
remainingFunds: liquidationRemainingFunds ?? 0n,
|
|
72
|
+
multicall
|
|
73
|
+
};
|
|
74
|
+
default:
|
|
75
|
+
return {
|
|
76
|
+
operation: fc.operation,
|
|
77
|
+
creditAccount: fc.creditAccount,
|
|
78
|
+
multicall
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function countAdapterCalls(innerCalls, register) {
|
|
84
|
+
return innerCalls.filter((call) => {
|
|
85
|
+
const contract = register.getContract(call.target);
|
|
86
|
+
return !contract || contract instanceof import_adapters.AbstractAdapterContract;
|
|
87
|
+
}).length;
|
|
88
|
+
}
|
|
89
|
+
function assemblePartialLiquidation(fc) {
|
|
90
|
+
const { rawArgs } = fc.parsed;
|
|
91
|
+
return {
|
|
92
|
+
operation: "PartiallyLiquidateCreditAccount",
|
|
93
|
+
creditAccount: fc.creditAccount,
|
|
94
|
+
token: rawArgs.token,
|
|
95
|
+
repaidAmount: rawArgs.repaidAmount,
|
|
96
|
+
minSeizedAmount: rawArgs.minSeizedAmount,
|
|
97
|
+
to: rawArgs.to
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
+
0 && (module.exports = {
|
|
102
|
+
assembleOperations
|
|
103
|
+
});
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var classifyMulticallOperations_exports = {};
|
|
20
|
+
__export(classifyMulticallOperations_exports, {
|
|
21
|
+
classifyMulticallOperations: () => classifyMulticallOperations
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(classifyMulticallOperations_exports);
|
|
24
|
+
var import_viem = require("viem");
|
|
25
|
+
var import_adapters = require("../plugins/adapters/index.js");
|
|
26
|
+
var import_errors = require("./errors.js");
|
|
27
|
+
function classifyMulticallOperations(input) {
|
|
28
|
+
const {
|
|
29
|
+
innerCalls,
|
|
30
|
+
executeResults,
|
|
31
|
+
protocolCalldatas,
|
|
32
|
+
register,
|
|
33
|
+
creditAccount,
|
|
34
|
+
underlying,
|
|
35
|
+
strict,
|
|
36
|
+
phantomTokens
|
|
37
|
+
} = input;
|
|
38
|
+
let transferIdx = 0;
|
|
39
|
+
const result = [];
|
|
40
|
+
for (const call of innerCalls) {
|
|
41
|
+
const contract = register.getContract(call.target);
|
|
42
|
+
if (contract instanceof import_adapters.AbstractAdapterContract) {
|
|
43
|
+
const idx = transferIdx++;
|
|
44
|
+
const executeResult = executeResults[idx];
|
|
45
|
+
if (!executeResult) {
|
|
46
|
+
throw new import_errors.TransferAlignmentError(executeResults.length, transferIdx);
|
|
47
|
+
}
|
|
48
|
+
const { transfers: transfers2, targetContract: targetContract2 } = executeResult;
|
|
49
|
+
const protocolCalldata = protocolCalldatas[idx];
|
|
50
|
+
const partial = contract.parseAdapterOperation(
|
|
51
|
+
call,
|
|
52
|
+
transfers2,
|
|
53
|
+
creditAccount,
|
|
54
|
+
protocolCalldata,
|
|
55
|
+
strict
|
|
56
|
+
);
|
|
57
|
+
if (partial) result.push({ ...partial, protocol: targetContract2 });
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (contract !== void 0) {
|
|
61
|
+
const op = classifyFacadeInnerCall(call, underlying, phantomTokens);
|
|
62
|
+
if (op) result.push(op);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (strict) {
|
|
66
|
+
throw new import_errors.UnknownAdapterError(call.target);
|
|
67
|
+
}
|
|
68
|
+
const unknownIdx = transferIdx++;
|
|
69
|
+
const unknownResult = executeResults[unknownIdx];
|
|
70
|
+
if (!unknownResult) {
|
|
71
|
+
throw new import_errors.TransferAlignmentError(executeResults.length, transferIdx);
|
|
72
|
+
}
|
|
73
|
+
const { transfers, targetContract } = unknownResult;
|
|
74
|
+
const netTransfers = (0, import_adapters.toNetTransfers)(transfers, creditAccount);
|
|
75
|
+
result.push({
|
|
76
|
+
operation: "Execute",
|
|
77
|
+
adapter: call.target,
|
|
78
|
+
protocol: targetContract,
|
|
79
|
+
adapterType: call.contractType,
|
|
80
|
+
version: call.version,
|
|
81
|
+
label: call.label,
|
|
82
|
+
adapterFunctionName: call.functionName,
|
|
83
|
+
adapterArgs: call.rawArgs,
|
|
84
|
+
protocolFunctionName: call.functionName,
|
|
85
|
+
protocolArgs: call.rawArgs,
|
|
86
|
+
transfers,
|
|
87
|
+
legacy: {
|
|
88
|
+
operation: "Swap",
|
|
89
|
+
...(0, import_adapters.swapFromTransfers)(netTransfers)
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
if (transferIdx !== executeResults.length) {
|
|
94
|
+
throw new import_errors.TransferAlignmentError(executeResults.length, transferIdx);
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
function classifyFacadeInnerCall(call, underlying, phantomTokens) {
|
|
99
|
+
const { functionName: sig, rawArgs } = call;
|
|
100
|
+
const functionName = sig.split("(")[0];
|
|
101
|
+
switch (functionName) {
|
|
102
|
+
case "increaseDebt":
|
|
103
|
+
return {
|
|
104
|
+
operation: "IncreaseBorrowedAmount",
|
|
105
|
+
token: underlying,
|
|
106
|
+
amount: rawArgs.amount
|
|
107
|
+
};
|
|
108
|
+
case "decreaseDebt":
|
|
109
|
+
return {
|
|
110
|
+
operation: "DecreaseBorrowedAmount",
|
|
111
|
+
token: underlying,
|
|
112
|
+
amount: rawArgs.amount
|
|
113
|
+
};
|
|
114
|
+
case "addCollateral":
|
|
115
|
+
case "addCollateralWithPermit":
|
|
116
|
+
return {
|
|
117
|
+
operation: "AddCollateral",
|
|
118
|
+
token: rawArgs.token,
|
|
119
|
+
amount: rawArgs.amount
|
|
120
|
+
};
|
|
121
|
+
case "withdrawCollateral": {
|
|
122
|
+
const calldataToken = rawArgs.token;
|
|
123
|
+
const depositedToken = findPhantomDepositedToken(
|
|
124
|
+
calldataToken,
|
|
125
|
+
phantomTokens
|
|
126
|
+
);
|
|
127
|
+
return {
|
|
128
|
+
operation: "WithdrawCollateral",
|
|
129
|
+
token: depositedToken ?? calldataToken,
|
|
130
|
+
amount: rawArgs.amount,
|
|
131
|
+
to: rawArgs.to,
|
|
132
|
+
...depositedToken ? { phantomToken: calldataToken } : {}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
case "updateQuota":
|
|
136
|
+
return {
|
|
137
|
+
operation: "UpdateQuota",
|
|
138
|
+
token: rawArgs.token,
|
|
139
|
+
change: rawArgs.quotaChange
|
|
140
|
+
};
|
|
141
|
+
// other unclassified facade calls, for example onDemandPriceUpdates
|
|
142
|
+
// https://github.com/Gearbox-protocol/core-v3/blob/b038597d9070d9fd18593a6ae9c3d28ca931bb73/contracts/credit/CreditFacadeV3.sol#L534
|
|
143
|
+
default:
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function findPhantomDepositedToken(calldataToken, phantomTokens) {
|
|
148
|
+
if (!phantomTokens) return void 0;
|
|
149
|
+
for (const [phantom, deposited] of phantomTokens.entries()) {
|
|
150
|
+
if ((0, import_viem.isAddressEqual)(phantom, calldataToken)) return deposited;
|
|
151
|
+
}
|
|
152
|
+
return void 0;
|
|
153
|
+
}
|
|
154
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
155
|
+
0 && (module.exports = {
|
|
156
|
+
classifyMulticallOperations
|
|
157
|
+
});
|