@gearbox-protocol/sdk 12.8.1 → 12.9.0-txparser.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dev/providers.js +0 -12
- package/dist/cjs/history/assembleOperations.js +110 -0
- package/dist/cjs/history/classifyMulticallOperations.js +157 -0
- package/dist/cjs/history/enrichTokens.js +80 -0
- package/dist/cjs/history/errors.js +91 -0
- package/dist/cjs/history/extractProtocolCalls.js +53 -0
- package/dist/cjs/history/extractTransfers.js +166 -0
- package/dist/cjs/history/findFacadeCalls.js +84 -0
- package/dist/cjs/history/index.js +38 -0
- package/dist/cjs/history/inner-operations.js +16 -0
- package/dist/cjs/history/internal-types.js +16 -0
- package/dist/cjs/history/package.json +1 -0
- package/dist/cjs/history/parseCreditAccountTransaction.js +83 -0
- package/dist/cjs/history/populateContractsRegister.js +68 -0
- package/dist/cjs/history/toLegacyOperation.js +120 -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 +51 -0
- package/dist/cjs/sdk/base/ChainContractsRegister.js +33 -0
- package/dist/cjs/sdk/base/PlaceholderContract.js +2 -2
- package/dist/cjs/sdk/base/TokensMeta.js +1 -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/utils/abi-decode.js +43 -2
- package/dist/esm/dev/providers.js +0 -12
- package/dist/esm/history/assembleOperations.js +86 -0
- package/dist/esm/history/classifyMulticallOperations.js +137 -0
- package/dist/esm/history/enrichTokens.js +56 -0
- package/dist/esm/history/errors.js +62 -0
- package/dist/esm/history/extractProtocolCalls.js +32 -0
- package/dist/esm/history/extractTransfers.js +146 -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/package.json +1 -0
- package/dist/esm/history/parseCreditAccountTransaction.js +59 -0
- package/dist/esm/history/populateContractsRegister.js +52 -0
- package/dist/esm/history/toLegacyOperation.js +96 -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 +53 -0
- package/dist/esm/sdk/base/ChainContractsRegister.js +33 -0
- package/dist/esm/sdk/base/PlaceholderContract.js +2 -2
- package/dist/esm/sdk/base/TokensMeta.js +6 -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/utils/abi-decode.js +43 -2
- package/dist/types/dev/providers.d.ts +5 -5
- package/dist/types/history/assembleOperations.d.ts +24 -0
- package/dist/types/history/classifyMulticallOperations.d.ts +35 -0
- package/dist/types/history/enrichTokens.d.ts +5 -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/parseCreditAccountTransaction.d.ts +29 -0
- package/dist/types/history/populateContractsRegister.d.ts +19 -0
- package/dist/types/history/toLegacyOperation.d.ts +35 -0
- package/dist/types/history/trace-utils.d.ts +12 -0
- package/dist/types/history/types.d.ts +65 -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 +64 -1
- package/dist/types/sdk/base/BaseContract.d.ts +14 -1
- package/dist/types/sdk/base/ChainContractsRegister.d.ts +11 -1
- package/dist/types/sdk/base/PlaceholderContract.d.ts +2 -2
- package/dist/types/sdk/base/TokensMeta.d.ts +1 -1
- 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/utils/abi-decode.d.ts +14 -1
- package/package.json +7 -2
- 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,233 @@
|
|
|
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 MellowVaultAdapterContract_exports = {};
|
|
20
|
+
__export(MellowVaultAdapterContract_exports, {
|
|
21
|
+
MellowVaultAdapterContract: () => MellowVaultAdapterContract,
|
|
22
|
+
iMellowVaultAbi: () => iMellowVaultAbi,
|
|
23
|
+
iMellowVaultAdapterAbi: () => iMellowVaultAdapterAbi
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(MellowVaultAdapterContract_exports);
|
|
26
|
+
var import_viem = require("viem");
|
|
27
|
+
var import_sdk = require("../../../../sdk/index.js");
|
|
28
|
+
var import_AbstractAdapter = require("../AbstractAdapter.js");
|
|
29
|
+
const iMellowVaultAdapterAbi = [
|
|
30
|
+
{
|
|
31
|
+
type: "function",
|
|
32
|
+
name: "allowedUnderlyings",
|
|
33
|
+
inputs: [],
|
|
34
|
+
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
35
|
+
stateMutability: "view"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: "function",
|
|
39
|
+
name: "contractType",
|
|
40
|
+
inputs: [],
|
|
41
|
+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
42
|
+
stateMutability: "view"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "function",
|
|
46
|
+
name: "creditManager",
|
|
47
|
+
inputs: [],
|
|
48
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
49
|
+
stateMutability: "view"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: "function",
|
|
53
|
+
name: "deposit",
|
|
54
|
+
inputs: [
|
|
55
|
+
{ name: "", type: "address", internalType: "address" },
|
|
56
|
+
{ name: "amounts", type: "uint256[]", internalType: "uint256[]" },
|
|
57
|
+
{ name: "minLpAmount", type: "uint256", internalType: "uint256" },
|
|
58
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" }
|
|
59
|
+
],
|
|
60
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
61
|
+
stateMutability: "nonpayable"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: "function",
|
|
65
|
+
name: "depositOneAsset",
|
|
66
|
+
inputs: [
|
|
67
|
+
{ name: "asset", type: "address", internalType: "address" },
|
|
68
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
69
|
+
{ name: "minLpAmount", type: "uint256", internalType: "uint256" },
|
|
70
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" }
|
|
71
|
+
],
|
|
72
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
73
|
+
stateMutability: "nonpayable"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: "function",
|
|
77
|
+
name: "depositOneAssetDiff",
|
|
78
|
+
inputs: [
|
|
79
|
+
{ name: "asset", type: "address", internalType: "address" },
|
|
80
|
+
{ name: "leftoverAmount", type: "uint256", internalType: "uint256" },
|
|
81
|
+
{ name: "rateMinRAY", type: "uint256", internalType: "uint256" },
|
|
82
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" }
|
|
83
|
+
],
|
|
84
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
85
|
+
stateMutability: "nonpayable"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: "function",
|
|
89
|
+
name: "serialize",
|
|
90
|
+
inputs: [],
|
|
91
|
+
outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
|
|
92
|
+
stateMutability: "view"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "function",
|
|
96
|
+
name: "setUnderlyingStatusBatch",
|
|
97
|
+
inputs: [
|
|
98
|
+
{
|
|
99
|
+
name: "underlyings",
|
|
100
|
+
type: "tuple[]",
|
|
101
|
+
internalType: "struct MellowUnderlyingStatus[]",
|
|
102
|
+
components: [
|
|
103
|
+
{ name: "underlying", type: "address", internalType: "address" },
|
|
104
|
+
{ name: "allowed", type: "bool", internalType: "bool" }
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
outputs: [],
|
|
109
|
+
stateMutability: "nonpayable"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: "function",
|
|
113
|
+
name: "targetContract",
|
|
114
|
+
inputs: [],
|
|
115
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
116
|
+
stateMutability: "view"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: "function",
|
|
120
|
+
name: "version",
|
|
121
|
+
inputs: [],
|
|
122
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
123
|
+
stateMutability: "view"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: "event",
|
|
127
|
+
name: "SetUnderlyingStatus",
|
|
128
|
+
inputs: [
|
|
129
|
+
{
|
|
130
|
+
name: "token",
|
|
131
|
+
type: "address",
|
|
132
|
+
indexed: true,
|
|
133
|
+
internalType: "address"
|
|
134
|
+
},
|
|
135
|
+
{ name: "newStatus", type: "bool", indexed: false, internalType: "bool" }
|
|
136
|
+
],
|
|
137
|
+
anonymous: false
|
|
138
|
+
},
|
|
139
|
+
{ type: "error", name: "IncorrectArrayLengthException", inputs: [] },
|
|
140
|
+
{
|
|
141
|
+
type: "error",
|
|
142
|
+
name: "UnderlyingNotAllowedException",
|
|
143
|
+
inputs: [{ name: "asset", type: "address", internalType: "address" }]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
type: "error",
|
|
147
|
+
name: "UnderlyingNotFoundException",
|
|
148
|
+
inputs: [{ name: "asset", type: "address", internalType: "address" }]
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
const iMellowVaultAbi = [
|
|
152
|
+
{
|
|
153
|
+
type: "function",
|
|
154
|
+
name: "deposit",
|
|
155
|
+
inputs: [
|
|
156
|
+
{ name: "to", type: "address", internalType: "address" },
|
|
157
|
+
{ name: "amounts", type: "uint256[]", internalType: "uint256[]" },
|
|
158
|
+
{ name: "minLpAmount", type: "uint256", internalType: "uint256" },
|
|
159
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" }
|
|
160
|
+
],
|
|
161
|
+
outputs: [
|
|
162
|
+
{ name: "actualAmounts", type: "uint256[]", internalType: "uint256[]" },
|
|
163
|
+
{ name: "lpAmount", type: "uint256", internalType: "uint256" }
|
|
164
|
+
],
|
|
165
|
+
stateMutability: "nonpayable"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
type: "function",
|
|
169
|
+
name: "totalSupply",
|
|
170
|
+
inputs: [],
|
|
171
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
172
|
+
stateMutability: "view"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: "function",
|
|
176
|
+
name: "underlyingTokens",
|
|
177
|
+
inputs: [],
|
|
178
|
+
outputs: [
|
|
179
|
+
{
|
|
180
|
+
name: "underlyinigTokens_",
|
|
181
|
+
type: "address[]",
|
|
182
|
+
internalType: "address[]"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
stateMutability: "view"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: "function",
|
|
189
|
+
name: "underlyingTvl",
|
|
190
|
+
inputs: [],
|
|
191
|
+
outputs: [
|
|
192
|
+
{ name: "tokens", type: "address[]", internalType: "address[]" },
|
|
193
|
+
{ name: "amounts", type: "uint256[]", internalType: "uint256[]" }
|
|
194
|
+
],
|
|
195
|
+
stateMutability: "view"
|
|
196
|
+
}
|
|
197
|
+
];
|
|
198
|
+
const abi = iMellowVaultAdapterAbi;
|
|
199
|
+
const protocolAbi = iMellowVaultAbi;
|
|
200
|
+
class MellowVaultAdapterContract extends import_AbstractAdapter.AbstractAdapterContract {
|
|
201
|
+
#allowedUnderlyings;
|
|
202
|
+
constructor(options, args) {
|
|
203
|
+
super(options, { ...args, abi, protocolAbi });
|
|
204
|
+
if (args.baseParams.serializedParams) {
|
|
205
|
+
const decoded = (0, import_viem.decodeAbiParameters)(
|
|
206
|
+
[
|
|
207
|
+
{ type: "address", name: "creditManager" },
|
|
208
|
+
{ type: "address", name: "targetContract" },
|
|
209
|
+
{ type: "address[]", name: "allowedUnderlyings" }
|
|
210
|
+
],
|
|
211
|
+
args.baseParams.serializedParams
|
|
212
|
+
);
|
|
213
|
+
this.#allowedUnderlyings = [...decoded[2]];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
get allowedUnderlyings() {
|
|
217
|
+
if (!this.#allowedUnderlyings)
|
|
218
|
+
throw new import_sdk.MissingSerializedParamsError("allowedUnderlyings");
|
|
219
|
+
return this.#allowedUnderlyings;
|
|
220
|
+
}
|
|
221
|
+
/** Legacy adapter not present in integrations-v3. Go: MellowDeposit via operation_type.go L125-L130 */
|
|
222
|
+
classifyLegacyOperation(_parsed, _transfers) {
|
|
223
|
+
throw new Error(
|
|
224
|
+
`classifyLegacyOperation is not supported for legacy adapter: ${this.contractType}`
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
229
|
+
0 && (module.exports = {
|
|
230
|
+
MellowVaultAdapterContract,
|
|
231
|
+
iMellowVaultAbi,
|
|
232
|
+
iMellowVaultAdapterAbi
|
|
233
|
+
});
|
|
@@ -0,0 +1,359 @@
|
|
|
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 YearnV2AdapterContract_exports = {};
|
|
20
|
+
__export(YearnV2AdapterContract_exports, {
|
|
21
|
+
YearnV2RouterAdapterContract: () => YearnV2RouterAdapterContract,
|
|
22
|
+
iYearnV2AdapterAbi: () => iYearnV2AdapterAbi
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(YearnV2AdapterContract_exports);
|
|
25
|
+
var import_viem = require("viem");
|
|
26
|
+
var import_sdk = require("../../../../sdk/index.js");
|
|
27
|
+
var import_AbstractAdapter = require("../AbstractAdapter.js");
|
|
28
|
+
const iYearnV2AdapterAbi = [
|
|
29
|
+
{
|
|
30
|
+
type: "function",
|
|
31
|
+
name: "contractType",
|
|
32
|
+
inputs: [],
|
|
33
|
+
outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
|
|
34
|
+
stateMutability: "view"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "function",
|
|
38
|
+
name: "creditManager",
|
|
39
|
+
inputs: [],
|
|
40
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
41
|
+
stateMutability: "view"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "function",
|
|
45
|
+
name: "deposit",
|
|
46
|
+
inputs: [
|
|
47
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
48
|
+
{ name: "", type: "address", internalType: "address" }
|
|
49
|
+
],
|
|
50
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
51
|
+
stateMutability: "nonpayable"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: "function",
|
|
55
|
+
name: "deposit",
|
|
56
|
+
inputs: [{ name: "amount", type: "uint256", internalType: "uint256" }],
|
|
57
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
58
|
+
stateMutability: "nonpayable"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
type: "function",
|
|
62
|
+
name: "depositDiff",
|
|
63
|
+
inputs: [
|
|
64
|
+
{ name: "leftoverAmount", type: "uint256", internalType: "uint256" }
|
|
65
|
+
],
|
|
66
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
67
|
+
stateMutability: "nonpayable"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: "function",
|
|
71
|
+
name: "serialize",
|
|
72
|
+
inputs: [],
|
|
73
|
+
outputs: [{ name: "serializedData", type: "bytes", internalType: "bytes" }],
|
|
74
|
+
stateMutability: "view"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "function",
|
|
78
|
+
name: "targetContract",
|
|
79
|
+
inputs: [],
|
|
80
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
81
|
+
stateMutability: "view"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: "function",
|
|
85
|
+
name: "token",
|
|
86
|
+
inputs: [],
|
|
87
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
88
|
+
stateMutability: "view"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: "function",
|
|
92
|
+
name: "version",
|
|
93
|
+
inputs: [],
|
|
94
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
95
|
+
stateMutability: "view"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: "function",
|
|
99
|
+
name: "withdraw",
|
|
100
|
+
inputs: [
|
|
101
|
+
{ name: "maxShares", type: "uint256", internalType: "uint256" },
|
|
102
|
+
{ name: "", type: "address", internalType: "address" }
|
|
103
|
+
],
|
|
104
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
105
|
+
stateMutability: "nonpayable"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: "function",
|
|
109
|
+
name: "withdraw",
|
|
110
|
+
inputs: [{ name: "maxShares", type: "uint256", internalType: "uint256" }],
|
|
111
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
112
|
+
stateMutability: "nonpayable"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: "function",
|
|
116
|
+
name: "withdraw",
|
|
117
|
+
inputs: [
|
|
118
|
+
{ name: "maxShares", type: "uint256", internalType: "uint256" },
|
|
119
|
+
{ name: "", type: "address", internalType: "address" },
|
|
120
|
+
{ name: "maxLoss", type: "uint256", internalType: "uint256" }
|
|
121
|
+
],
|
|
122
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
123
|
+
stateMutability: "nonpayable"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: "function",
|
|
127
|
+
name: "withdrawDiff",
|
|
128
|
+
inputs: [
|
|
129
|
+
{ name: "leftoverAmount", type: "uint256", internalType: "uint256" }
|
|
130
|
+
],
|
|
131
|
+
outputs: [{ name: "useSafePrices", type: "bool", internalType: "bool" }],
|
|
132
|
+
stateMutability: "nonpayable"
|
|
133
|
+
}
|
|
134
|
+
];
|
|
135
|
+
const iYVaultAbi = [
|
|
136
|
+
{
|
|
137
|
+
type: "function",
|
|
138
|
+
name: "allowance",
|
|
139
|
+
inputs: [
|
|
140
|
+
{ name: "owner", type: "address", internalType: "address" },
|
|
141
|
+
{ name: "spender", type: "address", internalType: "address" }
|
|
142
|
+
],
|
|
143
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
144
|
+
stateMutability: "view"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: "function",
|
|
148
|
+
name: "approve",
|
|
149
|
+
inputs: [
|
|
150
|
+
{ name: "spender", type: "address", internalType: "address" },
|
|
151
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
152
|
+
],
|
|
153
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
154
|
+
stateMutability: "nonpayable"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: "function",
|
|
158
|
+
name: "balanceOf",
|
|
159
|
+
inputs: [{ name: "account", type: "address", internalType: "address" }],
|
|
160
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
161
|
+
stateMutability: "view"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: "function",
|
|
165
|
+
name: "decimals",
|
|
166
|
+
inputs: [],
|
|
167
|
+
outputs: [{ name: "", type: "uint8", internalType: "uint8" }],
|
|
168
|
+
stateMutability: "view"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: "function",
|
|
172
|
+
name: "deposit",
|
|
173
|
+
inputs: [
|
|
174
|
+
{ name: "_amount", type: "uint256", internalType: "uint256" },
|
|
175
|
+
{ name: "recipient", type: "address", internalType: "address" }
|
|
176
|
+
],
|
|
177
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
178
|
+
stateMutability: "nonpayable"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
type: "function",
|
|
182
|
+
name: "deposit",
|
|
183
|
+
inputs: [{ name: "_amount", type: "uint256", internalType: "uint256" }],
|
|
184
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
185
|
+
stateMutability: "nonpayable"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: "function",
|
|
189
|
+
name: "deposit",
|
|
190
|
+
inputs: [],
|
|
191
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
192
|
+
stateMutability: "nonpayable"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
type: "function",
|
|
196
|
+
name: "name",
|
|
197
|
+
inputs: [],
|
|
198
|
+
outputs: [{ name: "", type: "string", internalType: "string" }],
|
|
199
|
+
stateMutability: "view"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
type: "function",
|
|
203
|
+
name: "pricePerShare",
|
|
204
|
+
inputs: [],
|
|
205
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
206
|
+
stateMutability: "view"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: "function",
|
|
210
|
+
name: "symbol",
|
|
211
|
+
inputs: [],
|
|
212
|
+
outputs: [{ name: "", type: "string", internalType: "string" }],
|
|
213
|
+
stateMutability: "view"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: "function",
|
|
217
|
+
name: "token",
|
|
218
|
+
inputs: [],
|
|
219
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
220
|
+
stateMutability: "view"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
type: "function",
|
|
224
|
+
name: "totalSupply",
|
|
225
|
+
inputs: [],
|
|
226
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
227
|
+
stateMutability: "view"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
type: "function",
|
|
231
|
+
name: "transfer",
|
|
232
|
+
inputs: [
|
|
233
|
+
{ name: "to", type: "address", internalType: "address" },
|
|
234
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
235
|
+
],
|
|
236
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
237
|
+
stateMutability: "nonpayable"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
type: "function",
|
|
241
|
+
name: "transferFrom",
|
|
242
|
+
inputs: [
|
|
243
|
+
{ name: "from", type: "address", internalType: "address" },
|
|
244
|
+
{ name: "to", type: "address", internalType: "address" },
|
|
245
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
246
|
+
],
|
|
247
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
248
|
+
stateMutability: "nonpayable"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
type: "function",
|
|
252
|
+
name: "withdraw",
|
|
253
|
+
inputs: [
|
|
254
|
+
{ name: "maxShares", type: "uint256", internalType: "uint256" },
|
|
255
|
+
{ name: "recipient", type: "address", internalType: "address" }
|
|
256
|
+
],
|
|
257
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
258
|
+
stateMutability: "nonpayable"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
type: "function",
|
|
262
|
+
name: "withdraw",
|
|
263
|
+
inputs: [{ name: "maxShares", type: "uint256", internalType: "uint256" }],
|
|
264
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
265
|
+
stateMutability: "nonpayable"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
type: "function",
|
|
269
|
+
name: "withdraw",
|
|
270
|
+
inputs: [],
|
|
271
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
272
|
+
stateMutability: "nonpayable"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
type: "function",
|
|
276
|
+
name: "withdraw",
|
|
277
|
+
inputs: [
|
|
278
|
+
{ name: "maxShares", type: "uint256", internalType: "uint256" },
|
|
279
|
+
{ name: "recipient", type: "address", internalType: "address" },
|
|
280
|
+
{ name: "maxLoss", type: "uint256", internalType: "uint256" }
|
|
281
|
+
],
|
|
282
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
283
|
+
stateMutability: "nonpayable"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
type: "event",
|
|
287
|
+
name: "Approval",
|
|
288
|
+
inputs: [
|
|
289
|
+
{
|
|
290
|
+
name: "owner",
|
|
291
|
+
type: "address",
|
|
292
|
+
indexed: true,
|
|
293
|
+
internalType: "address"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "spender",
|
|
297
|
+
type: "address",
|
|
298
|
+
indexed: true,
|
|
299
|
+
internalType: "address"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: "value",
|
|
303
|
+
type: "uint256",
|
|
304
|
+
indexed: false,
|
|
305
|
+
internalType: "uint256"
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
anonymous: false
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
type: "event",
|
|
312
|
+
name: "Transfer",
|
|
313
|
+
inputs: [
|
|
314
|
+
{ name: "from", type: "address", indexed: true, internalType: "address" },
|
|
315
|
+
{ name: "to", type: "address", indexed: true, internalType: "address" },
|
|
316
|
+
{
|
|
317
|
+
name: "value",
|
|
318
|
+
type: "uint256",
|
|
319
|
+
indexed: false,
|
|
320
|
+
internalType: "uint256"
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
anonymous: false
|
|
324
|
+
}
|
|
325
|
+
];
|
|
326
|
+
const abi = iYearnV2AdapterAbi;
|
|
327
|
+
const protocolAbi = iYVaultAbi;
|
|
328
|
+
class YearnV2RouterAdapterContract extends import_AbstractAdapter.AbstractAdapterContract {
|
|
329
|
+
#token;
|
|
330
|
+
constructor(options, args) {
|
|
331
|
+
super(options, { ...args, abi, protocolAbi });
|
|
332
|
+
if (args.baseParams.serializedParams) {
|
|
333
|
+
const decoded = (0, import_viem.decodeAbiParameters)(
|
|
334
|
+
[
|
|
335
|
+
{ type: "address", name: "creditManager" },
|
|
336
|
+
{ type: "address", name: "targetContract" },
|
|
337
|
+
{ type: "address", name: "token" }
|
|
338
|
+
],
|
|
339
|
+
args.baseParams.serializedParams
|
|
340
|
+
);
|
|
341
|
+
this.#token = decoded[2];
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
get token() {
|
|
345
|
+
if (!this.#token) throw new import_sdk.MissingSerializedParamsError("token");
|
|
346
|
+
return this.#token;
|
|
347
|
+
}
|
|
348
|
+
/** Legacy adapter not present in integrations-v3. Go: YearnDeposit/YearnWithDrawn via operation_type.go L105-L124 */
|
|
349
|
+
classifyLegacyOperation(_parsed, _transfers) {
|
|
350
|
+
throw new Error(
|
|
351
|
+
`classifyLegacyOperation is not supported for legacy adapter: ${this.contractType}`
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
356
|
+
0 && (module.exports = {
|
|
357
|
+
YearnV2RouterAdapterContract,
|
|
358
|
+
iYearnV2AdapterAbi
|
|
359
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var deprecated_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(deprecated_exports);
|
|
18
|
+
__reExport(deprecated_exports, require("./BalancerV2VaultAdapterContract.js"), module.exports);
|
|
19
|
+
__reExport(deprecated_exports, require("./EqualizerRouterAdapterContract.js"), module.exports);
|
|
20
|
+
__reExport(deprecated_exports, require("./InfraredVaultAdapterContract.js"), module.exports);
|
|
21
|
+
__reExport(deprecated_exports, require("./KodiakIslandGatewayAdapterContract.js"), module.exports);
|
|
22
|
+
__reExport(deprecated_exports, require("./MellowDepositQueueAdapterContract.js"), module.exports);
|
|
23
|
+
__reExport(deprecated_exports, require("./MellowRedeemQueueAdapterContract.js"), module.exports);
|
|
24
|
+
__reExport(deprecated_exports, require("./MellowVaultAdapterContract.js"), module.exports);
|
|
25
|
+
__reExport(deprecated_exports, require("./YearnV2AdapterContract.js"), module.exports);
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
...require("./BalancerV2VaultAdapterContract.js"),
|
|
29
|
+
...require("./EqualizerRouterAdapterContract.js"),
|
|
30
|
+
...require("./InfraredVaultAdapterContract.js"),
|
|
31
|
+
...require("./KodiakIslandGatewayAdapterContract.js"),
|
|
32
|
+
...require("./MellowDepositQueueAdapterContract.js"),
|
|
33
|
+
...require("./MellowRedeemQueueAdapterContract.js"),
|
|
34
|
+
...require("./MellowVaultAdapterContract.js"),
|
|
35
|
+
...require("./YearnV2AdapterContract.js")
|
|
36
|
+
});
|